Top
Set App Locale
  • 16 Sep 2024
  • 1 Minute To Read
  • Dark
    Light
  • PDF

Set App Locale

  • Dark
    Light
  • PDF

Article summary

Whatfix Mobile supports multilingual experiences. It also enables you to set an app locale by using the locale code, which automatically launches the experiences in that specific language without requesting your end users to select the language. 

The following table shows the languages, along with their corresponding language codes, that Whatfix Mobile supports:

LanguageISO 639-2 Code
Arabicara
Assameseasm
Bengaliben
Chinese (Simplified)chi
Chinese (Traditional)zho
Burmesemya
Czechces
Englishang
English-US
ang-us
Frenchfra
French-Canada
fr-ca
Germandeu
Gujaratiguj
Hebrewheb
Hindihin
Indonesianind
Italianita
Japanesejpn
Kannadakan
Kazakhkaz
Koreankor
Laolao
Malaymsa
Malayalammal
Marathimar
Mongolianmon
Punjabipan
Polishpol
Portuguesepor
Romanian
ron
Russianrus
Sinhalasin
Slovenian
slv
Spanishspa
Tamiltam
Telugutel
Thaitha
Turkishtur
Vietnamesevie

Use the following code snippet to set the app locale:

Android

Java
Leap.setAppLocale("<code_you_want_to_use>");

iOS-Swift

Swift
Leap.shared.setAppLocale("<code_you_want_to_use>")

iOS Objective-C

Objective-C
[[Leap shared] setAppLocale:@"<code_you_want_to_use>"];

ReactNative

JavaScriptJavaScriptJavaScript
LeapReactNative.setAppLocale('<code_you_want_to_use>');

Ionic

JavaScript
LeapPlugin.setAppLocale("<code_you_want_to_use>");

Cordova (Android)

JavaScriptJavaScriptJavaScript
cordova.plugin.LeapAndroid.setAppLocale("<code_you_want_to_use>");

Cordova (iOS)

JavaScriptJavaScriptJavaScript
cordova.plugin.LeapiOS.setAppLocale("<code_you_want_to_use>");

Xamarin Android

JavaScript
Leap.SetAppLocale("<code_you_want_to_use>");

Xamarin iOS

JavaScript
Leap.Shared.SetAppLocale("<code_you_want_to_use>");

Your title goes here
  • Before the locale code is set, the end user has the option to select the language in a multilingual in-app experience and change the language in the middle of the experience.
  • Once the language has been set, the end user is shown the experience in the language that is set. In-app experiences without the set language are ignored.
  • In case an incorrect locale code (one not present in the list) is set, the experiences are not rendered.



Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.