Localization: Localized labels for CHT applications

Given that CHT apps are used around the world, the Core Framework was designed with localization in mind. The Core Framework itself is available in English, French, Hindi, Nepali, Spanish, Swahili, and Indonesian. In the app_settings.json file the default language for the application is set, along with a separate default language for outgoing messages that are sent via SMS.


To modify some labels in the app add the key and modified label in a custom translations file in the translations folder. All the properties files use the format messages-{language-code}.properties, where the language code is the same 2-letter code used to identify the language in the application. For instance, for English, we would have a translations/ file.

New elements in CHT apps, such as tasks, targets, profiles, and forms should be localized as well. These labels should be included in the same custom translations properties file. If a translation is missing for the user’s language it will use that of the default language.

Here is an example, including both a modified label, and a new one:


    [Application Text]
    contact.type.district_hospital = Community
    targets.assessments.title = Assessments Completed


Translations for XForms are defined within the forms themselves. The XLSForm notation is documented here, and would use the corresponding 2-character language codes.


Custom translations from the properties files are added to the app with the upload-custom-translations action.

cht --local upload-custom-translations

Updated translations from forms need to be added with the actions to upload forms.

cht --local upload-contact-forms upload-app-forms