Create a mapping for the languages and locals from the device to match the Salesforce language codes.
Here is the example from the Release Notes (v1.6.1):
This dictionary when provided to the remoteLocaleMap parameter of the UIConfiguration initializer will result in remote
config service responses being translated in the following ways.
1. If the device locale is setup for English Canada the fetched language will be English
2. If the device locale is setup for French France the fetched language will be French
3. All other locales will result in German.
The default key is optional, and if not provided the device locale will be used, and if not supported by salesforce will not result
in properly translated strings.
The default parameter is optional and if omitted will just fallback to using the device locale
let localeMap = ["en-ca": "en",
"fr-fr": "fr",
"default": "de"]
let myConfig = UIConfiguration(serviceAPI: "<Your Service API URL>",
organizationId: "<Your Organization Id>",
developerName: "<Your Developer Name>",
remoteLocaleMap: localeMap,
conversationId: "<Your Conversation Id>")
Check the locale that is being sent from the device:
let langStr = Locale.current.languageCode
Then create a map to the Salesforce support languages.
English canada is show in the example, but in Spain for example the SDK may be sending the language code es-ES, with the Spanish for the locale of Spain. Salesforce does not know what this is. The Salesforce org only understands es. So the customer will need to create a map:
let localeMap = ["es-ES": "es",
"default": "es"]
003876263

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.