Localization
Learn how to localize Kustomer Chat.
The Kustomer chat SDK supports over 50 languages out of the box. It automatically translates strings into the primary language of the customer's language locale.
You can learn more about how to customize localization settings for your organization in the Kustomer Help Center.
Supported languages
The Kustomer chat SDK supports the following language locales out of the box:
Language | Code | Language | Code | Language | Code | ||
Afrikaans | af | German | de | Russian | ru | ||
Albanian | sq | Greek | el | Serbian | sr | ||
Arabic | ar | Hebrew | he | Serbian (Montenegro) | sr_me | ||
Arabic (EG) | ar_eg | Hindi | hi | Simplified Chinese | zh_cn | ||
Arabic (MA) | ar_ma | Hungarian | hu | Sinhala | si | ||
Belarusian | be | Icelandic | is | Slovakian | sk | ||
Bosnian | bs | Indonesian | id | Slovenian | sl | ||
Bulgarian | bg | Italian | it | Spanish | es | ||
Catalan | ca | Japanese | ja | Spanish (AR) | es_ar | ||
Croatian | hr | . | Kannada | kn | . | Spanish (PA) | es_pa |
Czech | cs | Kazakh | kk | Spanish (PE) | es_pe | ||
Danish | da | Korean | ko | Spanish (Spain) | es_es | ||
Dutch | nl | Kyrgyz | ky | Swahili | sw | ||
English (CA) | en_ca | Latvian | lv | Swedish | sv | ||
English (UK) | en_gb | Lithuanian | lt | Tamil | ta | ||
English (US) | en_us | Luxembourgish | lb | Telugu | te | ||
Estonian | et | Mongolian | mn | Thai | th | ||
Filipino | fil | Norwegian | no | Traditional Chinese | zh_tw | ||
Finnish | fi | Persian | fa | Turkish | tr | ||
French | fr | Polish | pl | Twi | tw | ||
French (CA) | fr_ca | Portuguese (BR) | br | Ukrainian | uk | ||
French (MA) | fr_ma | Portuguese (PT) | pt | Urdu | ur | ||
Georgian | ka | Punjabi | pa | Vietnamese | vi | ||
Romanian | ro |
Change the default language
Kustomer uses the device language as the default language. To change the default language, pass in the desired language locale when you initialize chat with options to override SDK settings.
In the example below, we set the default language to English, US:
val options = KustomerOptions.Builder()
.setUserLocale(Locale("en-US")) // use hyphen to append country code
Kustomer.init(application = this, apiKey = apiKey, options = options.build()) {
Log.i(TAG,"Kustomer is initialized ${it.dataOrNull}")
}
Per application language settings
If your app supports per app language settings available on Android 13, the same localization settings can be honored in the Kustomer Android Chat SDK starting from v3.1.0 and higher. To enable this feature, simply use KustomerOptions.useAppLocales
during Kustomer initialization process. When this flag is enabled, the Kustomer UI will use the same application locales set by AppCompatDelegate.getApplicationLocales()
.
By default, the SDK will use the system locales if no localization preferences are set. It is advised that this option shouldn't used in conjunction with KustomerOptions.userLocale
and doing so will ignore the custom user locale set in KustomerOptions.userLocale
and will use app languages instead.
Updated 4 months ago