All OpenMRS ID accounts have been reset.

Read more and change your password before signing in.
Icon

EXTENDED: OMRS14 Proposals due 30 April! Read more and submit a proposal at OpenMRS Talk.

Skip to end of metadata
Go to start of metadata
Icon

If you are a user of OpenMRS, and want to change the current language of your installation to another available language, see the Localization page.

Current status of translations

The current state of the i18n files in OpenMRS releases:

Where to find the files

OpenMRS Trunk

The most up-to-date file is the English messages.properties file in the trunk folder of the OpenMRS source code. You can download that file from our latest trunk branch here:

Other language translations are available in the WEB-INF directory, along with messages.properties. They are named with the 2-letter ISO 639-1 language code, such as messages_es.properties, messages_it.properties, etc. View them in our source code repository here:

If you have already installed OpenMRS, look in its WEB-INF folder for the messages.properties file.

Modules

Each module might have a different location for the messages.properties file.  Two of the more common locations are in the resources or metadata folder within the module code. One example is the reporting compatibility module where the files are located at trunk/omod/src/main/resources/

Step One: Adding or updating a translated language

Adding a new language

This is relatively easy. After downloading or saving messages.properties, rename a copy of it to your new language:

messages_xx.properties

where the "xx" is replaced with the two-letter, lowercase code from ISO 639-1.  Edit the file and modify all the phrases or words on the right side of the equals (=) sign to the new language. The left side of each line (left of the equals sign) must remain the same – they are needed by the system. You need to save the file as UTF-8 with BOM and leave the first line empty.

Put this new file into the WEB-INF folder of your OpenMRS installation and edit the locale.allowed.list global property in the OpenMRS administration section to list this new language code. You can now switch to that locale at the bottom of any OpenMRS page. If you cannot, then you need to restart OpenMRS.

Adding a new country locale within an existing language

This is if you want to specify a country for your language file. For example, US english would be messages_en_US.properties, or Chilean spanish would be messages_es_CL.properties. For this the best thing to do is to just have the country specific customizations in that file.

Updating or improving an existing language

Icon

Updates to messages.properties happen sometimes, so some lines in the file might disappear or be modified.

If you are updating a language, you will need to find all items from the English messages.properties file that are not in the your language's messages_xx.properties file and translate them. You can see below for tools to help you with this.

For OpenMRS trunk, put this new file into the WEB-INF folder of your OpenMRS installation. You should also save the file to a secure backup location--if you re-install OpenMRS, your updated file will not remain.

For OpenMRS modules, you will need to compile the module with this new file or submit it to the module's programmer for them to compile it with the new file.

Step Two: Submitting the files to OpenMRS (Please do this so that everyone gets the translation)

Create a new TRUNK issue in JIRA, our issue tracking system, and attach your modified messages.properties or new messages_xx.properties file. Explain what changes or the new language that you've added. Someone will review your updates or additions for inclusion in an upcoming OpenMRS release.

Helpful tools to use for translation

Custom Messaging module

Probably the most user friendly way to translate OpenMRS is to use the Custom Messages module. It supports user-defined, live translations of OpenMRS and its modules right when viewing the pages.

Database Messaging module

One way to translate OpenMRS is to use the Database Messaging module. As of October 2011, the main limitation was that you couldn’t easily see which of the messages were not translated in a specific locale.

Eclipse

Another way is to use Eclipse and its ResourceBundle Editor plugin. Download the plugin here. The limitation to this method is that you have to download the source code for the program (e.g., OpenMRS) you want to translate.

After downloading the plugin, extract the plugins to the Eclipse plugin directory, such as C:\eclipse\plugins.

Restart Eclipse and set the default program to open *.properties files to the resource bundle. Go to Window -> Preferences, in File Associations click Add, in the File Type, place *.properties and click OK.

Then in the File types: box click on the *.properties File Type and in the Associated editors:, click on ResourceBundle Editor, and then click on the Default button.

View Image Here

To use the editor, go to the properties file that you want to translate in your module or core (either by finding it within the project that you’ve downloaded into Eclipse or by doing the search command within Eclipse). Once you double click on the file, it will bring up the boxes where you can edit the different languages for that message.

View Image Here

Translating OpenMRS clinical terminology

The messages.properties file handles application-specific language. For more information about updating and translating clinical terminology used in OpenMRS, see Terminology Service Bureau.

3 Comments

  1. Apparently there are some exceptions to the ISO 639-1 list or maybe a bug somewhere?  I found that adding "he" to the global properties enabled hebrew down on the bottom of the list but when I clicked on this link the URL string at the top would include &lang=iw.  I think iw may be an old language code for Hebrew but not sure. My file had to be named messages_iw.properties in order for the translations to show up. Manually changing &lang=he didn't work.  I am running 1.8.3. Should I submit a bug?

    1. Tobin, OpenMRS is just delegating to java for the locale definition. I don't know that we can change that. You can open a bug ticket if you want us to look into it though!

  2. I am trying to follow the instructions in this page but I am kinda confused: So when I download the messages.properties from the link above, does make a copy means from the folder it self or through Eclipse? I did copy the file and rename it then throw it in the WEB-INF folder, but when I try to edit it by using Eclipse it does not give me an option to save it as UTF-8 with BOM. The only way to do UTF-8 is by going to the file's properties, and change the file type to UTF-8 and that is the only way I found. Also when I do the locale.allowed.list step I can't see the added language I am working on even after restarting OpenMRS.. Should I edit the file through a text editor?

    Thank you