Internationalization


THIS PAGE IS ARCHIVED AND AVAILABLE ONLY FOR REFERENCE PURPOSES. PLEASE REFER TO THIS PAGE FOR MORE DETAILS ON TRANSLATING BAHMNI

Future Process

An upcoming Bahmni release will feature shared translations, done online. See Translating Bahmni for this new approach. If you are planning a future Bahmni deployment, you should look at starting this shared translation process now.

The instructions on this page apply to current Bahmni installations, as well as local overrides of shared translations that eventually are included in the Bahmni product.

Context:

Internationalization provides a way to make the application available in multiple languages.  Internationalization is also referred as i18n because there are 18 characters between 'i' and 'n' in the word 'internationalization'.  Bahmni provides internationalization, in way that you have to do minimal changes to the bahmni_config.

Adding files required for the locale:

There is a folder called i18n in the openmrs folder inside the bahmni_config folder which contains all the files required for the locale. The directory structure reflects the various modules in the application. Each module has JSON files supporting different locales.

For example the file locale_en.json supports the English language.

So, if you want to add support for the Russian language, you just need to add a file named locale_ru.json in all modules.

What actually these JSON files contain? :

These JSON files contain a JSON object containing key, value pairs. All the keys are internally mapped to the text that is displayed in the module's web page to which the JSON file belongs to.

To get started, you can just copy existing locale file and rename it.

For example copy locale_en.json file and rename it as locale_ru.json. Then, translate the text values in that file and replace them with text in your language.

Performing complete translation:

bahmni_config folder only contains keys for the text that appears inside the bahmni_config folder only. Bahmni application by default supports English locale. It comes bundled with locale_en.json files for all modules. These files contain keys that correspond to the text inside the application. So, an implementer can't directly access those files. Instead you can access them at https://github.com/Bhamni/openmrs-module-bahmniapps/tree/master/ui/app/i18n. Copy all keys corresponding to the module into the locale file and translate all those text values also.

On this Page

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)