Building > Translations > Managing
Managing translations in the CHT
This section will take you through localizing the CHT to a custom language (in this guide, Swahili). This will include setting up the user interface labels as well as outgoing text messages.
By the end of the section you should be able to:
cht-conf installed locallymessages-sw.properties file.Create a messages-sw.properties file by using these instructions.
Populate the messages-sw.properties file with the appropriate translation and upload it onto your local CHT environment using the command below.
cht --url=https://medic:password@localhost --upload-custom-translations
or simply:
cht --local upload-custom-translations
For non-admin users, CHT Instance text refers to the text that falls under Messages, Tasks, Reports, People and Targets.
To localize instance text to Swahili, change the default system language to Swahili.

Go to App Management > Display > Languages > Default Language(Change to Swahili)

To find out what the language code for Swahili is, go to the list of languages as illustrated in the screenshot, click Kiswahili (Swahili) to show the options dropdown and click Edit Name. The code will be in the text box under Language Code on the popup.

For this example, the language code is sw.
After changing the CHT instance language to Swahili, the various elements will behave like this:
In the Messages tab, the time counter text and navigation text changes, as in the screenshots below.

In English

In Swahili
To change the title of the tab from the default title of the Messages tab from Jumbe in Kiswahili to Barua, add or edit the below value in the messages-sw.properties file:
Messages = Jumbe
to
Messages = Barua
Localize the Tasks header by adding the appropriate translation in the messages-sw.properties file.
For example, to translate the below delivery task title to Swahili:
{
name: 'anc-home-visit-delivery',
icon: 'icon-pregnancy',
title: 'task.anc.delivery.title',
}
Add the value below to the messages-sw.properties file:
task.anc.delivery.title = Kazi ya Kujifungua

In English

In Swahili
To change the title of the tab from the default title of the Tasks tab from Kazi in Kiswahili to Fanya Hizi, add or edit the below code in the messages-sw.properties file:
Tasks = Kazi
to
Tasks = Fanya Hizi
Localize the Reports tab field names by adding the appropriate translations in the messages-sw.properties file.
For example, to change the date of birth field to Swahili, in messages-sw.properties file, add this:
contact.type.date_of_birth = Siku ya Kuzaliwa

In English

In Swahili
To change the title of the tab from the default title of the Reports tab from Ripoti in Kiswahili to Ripoti hizi, add or edit the below code in the messages-sw.properties file.
Reports = Ripoti
to
Reports = Ripoti hizi
To localize the People tab labels, add the appropriate translation in messages-sw.properties file.
To change the people name label translation from the default Swahili translation of Watu to Watu wa hili hapa eneo, in messages-sw.properties file, add the following values:
contact.type.person = Mtu wa hili hapa eneo
contact.type.person.plural = Watu wa hili hapa eneo

In English

In Swahili
To change the title of the People tab from Wasiliani in Kiswahili to Watu, add or edit the below code in the messages-sw.properties file.
People = Wasiliani
to
People = Watu
To localize the People tab labels, add the appropriate translation in messages-sw.properties file.
To add the Growth Monitoring target title in Swahili, add the appropriate translation in the messages-sw.properties file.
targets.growth_monitoring.title = Ufuatiliaji wa ukuaji

Before

In Swahili
To change the title of the Targets tab from Grafu in Kiswahili to Lengo, add or edit the below code in the messages-sw.properties file.
Targets = Grafu
to
Targets = Lengo
As of version 4.18.0, the CHT has support for Right to Left languages, and bundles Arabic translations. Setting the language to Arabic will automatically switch the UI to a mirrored design, to align with standard RTL writing and web elements.


Any language can be set to be a RTL language via App Management > Display > Languages > Add/Edit language

To localize a CHT app form to Swahili, open the appropriate xlsx of the form and add a label::sw column which has the translation for the text. This will work in the Survey sheet or the choices sheet.

New Person app form XLS configuration

Default English translation

Form after switching CHV’s language to Kiswahili
The App Management - Admin Area section will still remain in English even after changing the default language to Swahili.
In projects that incorporate SMS workflows, there are SMS notifications/replies that go to CHVs and Supervisors phones.
To change the language of outgoing texts for a CHV or Supervisor to Swahili, follow the steps below.
app_settings.json, when configuring replies, add Swahili language code (sw) under locales:"locales": [
{
"code": "en",
"name": "English"
},
{
"code": "es",
"name": "Spanish"
},
{
"code": "fr",
"name": "French"
},
{
"code": "ne",
"name": "Nepali"
},
{
"code": "sw",
"name": "Swahili"
}
]
{
"messages":[
{
"message":[
{
"content":"Thank you, visit for {{patient_name}} ({{patient_id}}) has been recorded.",
"locale":"en"
},
{
"content":"Asante, kuhudhuria kwa {{patient_name}} ({{patient_id}} kumerekodiwa.",
"locale":"sw"
}
],
"event_type":"report_accepted",
"recipient":"reporting_unit"
}
]
}
Managing translations in the CHT
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.