1

We're using Embedded Service SDK in our react app for ServiceChat functionality.

Processing a case with different locale settings in the Salesforce system and on a specific user device, SDK will load with device locale, but we would like to rely on user settings in the Salesforce system.

Is it possible to run (call \ fire \ launch) SDK with the desired locale, but not with a device locale?

UPD: The question is whether the mobile SDK supports setting the desired locale bypassing standard behavior. The standard behavior is to take the locale from the device settings, but we need to set the locale for the SDK different from the device settings.

  • What about using LanguageLocaleKey and LocaleSidKey fields from a User object? Based on that you can set specific locales on mobile before displaying the data. User | SOAP API Developer Guide – Przemysław Tamoń Jan 9 at 12:52
  • question updated – AKm Jan 9 at 14:23
  • Embedded Service SDK (a.k.a Snap-In's) is a Service Cloud product that is not the Salesforce Mobile SDK. – Brandon Page Jan 10 at 19:04
1

I would recommend using LanguageLocaleKey and LocaleSidKey fields from a context User. Based on that you can set specific locales on mobile before displaying the data.

From User | SOAP API Developer Guide:

LocaleSidKey

Required. This field is a restricted picklist field. The value of the field affects formatting and parsing of values, especially numeric values, in the user interface. It does not affect the API. The field values are named according to the language, and country if necessary, using two-letter ISO codes. The set of names is based on the ISO standard. You can also manually set a user’s locale in the user interface, and then use that value for inserting or updating other users via the API.

LanguageLocaleKey

Required. The user’s language, such as “French” or “Chinese (Traditional).” Label is Language.

NOTE:

In API version 47.0 and later, when using the DescribeSObjectResult API to return PicklistEntry values from this picklist, the active value indicates whether the language is in the user’s Displayed Languages (true) or the user’s Available Languages (false). All other languages aren’t in the returned active value array.

In API version 46.0 and earlier, the PicklistEntry active values indicate whether the language is in either the user’s Displayed Languages or Available Languages lists (true) or not in either list (false).

These fields are not available through UserAccount class in MobileSDK but having other fields from this class you should be able to retrieve locales by REST/SOAP request.

| improve this answer | |
  • Thanks for the answer. But we have no problem determining the desired locale. The question is whether the mobile SDK supports setting the desired locale bypassing standard behavior. The standard behavior is to take the language standard from the device settings, but we need to set the locale for the SDK different from the device settings. – AKm Jan 9 at 14:14
0

Got an answer from Salesforce Service Cloud support about both systems iOS and Android.

They recommended using some kind of hacky solution for android devices - android docs : setLocale() method on Configuration class level.

And for ios system support confirmed the impossibility of any overriding device locale settings after iOS 13.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.