WA3.2 Language translation
openIMIS components: Web Application v1.3.0 and later.
Implementation roles required: Implementer | Developer
We suggest using Lokalise and Visual Studio to update the language resource files and to publish the updated version.
Video tutorial
openIMIS Legacy Web Application - Language Translation
Web Application .Net is supporting up to two languages. The language translation is done on the Web Application source code level (this page) and on the database level (see WA4.1 Language selection and translation tables).
The Web Application language localisation is using the default ASP.Net Globalization and Culture configuration. The translation is based on resource files. The generic application is translated into English-language and French-language.
In order to facilitate the translation of the Web Application and to have a common repository for language packs for openIMIS, we have subscribed to lokalise.com. If you wish to add new languages to openIMIS Web Application, you can request the access by visiting the Web Application project on lokalise. For more information on the translation platform please check Translation Management platform page.
Add a new language for Web Application in lokalise
Add new language to the project
From the Web Application project press the
+
button to add a new languageFrom the
Add languages
modal select the language to add. You can filter the languages by writing in the input field. In this example, we will choose French (Cameroon). Multiple languages can be added at once.Click the Add button.
Translate the glossary to the new language
From the Web Application project press the
Glossary
button to add a new languageFor each glossary term, translate in the new added language
Translate the Web Application into the new language
For each term in the Web Application project, translate it in the new language
Export the language as .Net resource file
From the Web Application project press the
Download
buttonSelect the language you want to download and the different download settings
Press
Build and download
button. This will download a ZIP file with resource files for all selected languages. Unzip
Add the new language in the Web Application project
Open in Visual Studio the Web Application .Net solution downloaded from Github
In the
Solution Explorer
window, navigate toIMIS project
→App_GlobalResources
folder and open the contextual menu with right-clickSelect
Add → Existing Item...
Select the resource file for the new language and press
Add.
This will copy the file to theApp_GlobalResources
folder and add it to the project.(Optional) you can check the new language by opening the resource file.
To use the new language, the Web Application .Net solution needs to be published and deployed. Nevertheless, you cannot use the new language unless you update the language selection and translation tables in the database.
Why Glossary is important
Because there is multiple truth and it is often complex and can change over time, the terminology must have the same meaning and same wording in the whole Web Application. It is also important that the country-specific names are validated by the country implementing openIMIS.
When using a glossary you ensure that you will use the same 'truth' across your application. In the case of lokalise, every time it will detect the glossary term, it will show the definition and the translation, allowing to be consistent in the translation package.
For example, in Tchad there are the different organisation names which must be adapted in openIMIS:
openIMIS default name | Tchad official old name | Tchad official new name | Tchad health zones |
---|---|---|---|
Regions | Région | Province | Délégation Sanitaire Provinciale |
District | Prefecture | Département | District sanitaires |
Municipality | Sous-préfecture | Commune | Zone de résponsabilité |
Village | Village | Village | Village |
Previous step: WA3.1 Escape procedures | Table of contents: Installation Guide | Next step: WA3.3 Deploy the localized Web Application |
Did you encounter a problem or do you have a suggestion?
Please contact our Service Desk
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/