Set App Locale
Learn how to set the app locale for the app and present experiences only in that app locale
Leap supports multilingual experiences. It also provides you the opportunity to set an app locale by using the locale code, which will launch the experiences in that locale code automatically without requesting your end users to select the language. The languages supported and the corresponding language codes are given below.
Name | Code |
English | ang |
Hindi | hin |
Bengali | ben |
Telugu | tel |
Kannada | kan |
Tamil | tam |
Malayalam | mal |
Gujarati | guj |
Assamese | asm |
Marathi | mar |
Punjabi | pan |
Sinhala | sin |
French | fra |
German | deu |
Italian | ita |
Spanish | spa |
Chinese | chi |
Arabic | ara |
Russian | rus |
Turkish | tur |
Hebrew | heb |
Thai | tha |
Czech | cze |
Cantonese | zho |
Indonesian | ind |
Vietnamese | vie |
Korean | kor |
Burmese | bur |
Mongolian | mon |
Malay | may |
Portuguese | por |
To set app locale use the below code
Android
iOS - Swift
iOS - Objective C
React Native
Xamarin(Android)
Xamarin (iOS)
Cordova (Android)
Cordova (iOS)
Ionic
Leap.setAppLocale("<code_you_want_to_use>");
Leap.shared.setAppLocale("<code_you_want_to_use>")
[[Leap shared] setAppLocale:@"<code_you_want_to_use>"];
LeapReactNative.setAppLocale('<code_you_want_to_use>');
Leap.SetAppLocale("<code_you_want_to_use>");
Leap.Shared.SetAppLocale("<code_you_want_to_use>");
cordova.plugin.LeapAndroid.setAppLocale("<code_you_want_to_use>");
cordova.plugin.LeapiOS.setAppLocale("<code_you_want_to_use>");
LeapPlugin.setAppLocale("<code_you_want_to_use>");
Before the locale code is set, the end user will have an option to select the language in a multilingual experience and also to change the language in between the experience
Once language is set, the end user will only be presented with experiences having that language. Experiences without the set language is ignored.
In case an incorrect locale code (one not present in the list) is set none of the experiences will be rendered.
Last modified 5mo ago