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, set options.language
to the desired language locale during Configuration.
In the example below, we use options.language
to set the default language to French:
options.language = .fr
en_us
as the backup language for Knowledge Base articlesIf you don't have a knowledge base available in the default language, Kustomer loads Knowledge Base articles for the
en_us
(English, US) locale as a backup.
Customize the built-in .lproj localizations
You can create overrides for strings for existing localizations if you'd like to customize or change the translations for specific values.
To customize built-in localizations, your project must have a Kustomer.strings
file.
Create the Kustomer.strings
file
Kustomer.strings
fileIf your project does not yet have a Localizable.strings
file with the different language localizations, you can create the file in Xcode.
To create the Kustomer.strings
file for your project:
-
Open your project in Xcode, and go to File > New > File and select Resource under the iOS category in the sidebar.
-
From the files, select Strings File and select Next.
-
Name the file
Kustomer
and select Create.
You will now have a Kustomer.strings
file in your project.
Customize the Chat SDK strings with new values:
Once you have a Kustomer.strings
file in your project, you can customize strings in the file.
To customize the Chat SDK strings in the Kustomer.strings
file with new values:
- Choose and add the strings to customize to the
Kustomer.strings
file in the following format:
// Add a key and change the value to what you want
"com.kustomer.week" = "Your Custom String Value";
- In Xcode, go to the Build Phases tab and make sure that the updated file is located in Copy Bundle Resources.
Add a new localization
You can add new localization strings for a language if the language is not included in the Chat SDK.
To add a new localization to your project:
-
In Xcode, select your
Kustomer.strings
file. On the right panel, go to Localize and select the language you would like to add. When you select the language, Xcode creates a differentKustomer.strings
file for the language. -
In the new file, add translations for all of the strings available in the SDK.
Updated 3 months ago