The SDK contains language folders for each language supported. For a list of supported languages, see Conversational Cloud System Requirements and Language Support. Each folder contains LPLocalizable.strings file for a specific language.
The example below contains four language folders:
- en.lproj: English strings (used in case we do not support the host app/device language)
- fr.lproj: French strings
- pt.lproj: Portuguese strings
- pt-PT.lproj: Portuguese (Portugal) strings
You can override the string localization of any supported language in Conversational Cloud. Create LPLocalizable.strings files for relevant languages inside your app, which includes the keys to override.
Create and localize a strings file and add languages
In your app, go to New file → Strings file → Create.
Create a file called LPLocalizable.strings.
Add a new key, for example, if you want to override the SDK English string of
"send" = "<ANY NEW VALUE>";
Tap the LPLocalizable.string file and open the file inspector.
Go to the Localization section and Tap Localize.
Open project settings, on the Info tab, under Localizations, press the plus (+).
Choose the new language you want to support.
Attach a strings file to existing languages
Choose the desired strings file.
Open the file inspector.
Under Localizations, choose the relevant languages.
Print or get localized keys or supported languages
Print all localized keys with a default English value in the SDK:
Get or print all localized supported languages in the SDK:
Get all supported languages by key-value (the key is locale key and value is language description):