Skip to main content
Answered

Can I add a language override to Intercom's mobile SDKs?

  • February 17, 2021
  • 1 reply
  • 576 views

In our application the language can be changed from "settings" and does not depend from device language. But your SDK choose language from the device settings and I have problem with that.

How can I change SDK language?

Best answer by Anonymous

Hey. I've shared a couple of code snippets below that should help you. There's a few things to note:

 

  • The override only works for languages we support. A full list of languages is available here.
  • The override is a server-side feature, so when you use these snippets an API call is made. You'll want to make sure that you set this when you initialise Intercom or when your customer's setting is changed. Doing it immediately before the Messenger is opened may result in the language override not being applied.

 

Android:

Intercom.client().updateUser(new UserAttributes.Builder().withLanguageOverride("FR").build());

 

iOS:

ICMUserAttributes *userAttributes = [ICMUserAttributes new];

userAttributes.languageOverride = @"FR";

[Intercom updateUser:userAttributes];

View original
Did this topic help you find an answer to your question?

1 reply

  • 0 replies
  • Answer
  • February 17, 2021

Hey. I've shared a couple of code snippets below that should help you. There's a few things to note:

 

  • The override only works for languages we support. A full list of languages is available here.
  • The override is a server-side feature, so when you use these snippets an API call is made. You'll want to make sure that you set this when you initialise Intercom or when your customer's setting is changed. Doing it immediately before the Messenger is opened may result in the language override not being applied.

 

Android:

Intercom.client().updateUser(new UserAttributes.Builder().withLanguageOverride("FR").build());

 

iOS:

ICMUserAttributes *userAttributes = [ICMUserAttributes new];

userAttributes.languageOverride = @"FR";

[Intercom updateUser:userAttributes];


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings