Gleap supports multiple languages. Add a language under Settings → Project → Languages and edit the widget’s built-in text under Settings → Project → Static translations. Use the SDK method below to select the language for the current user.
Gleap automatically picks the device language as default language. If the device language is not available it will switch to English as a fallback. In some situations you might want to overwrite the device language with a custom language. This can be achieved with the following method.
Overwrite the default language
JavaScript
// 2 digit ISO code
Gleap.setLanguage({
languageCode: "es",
});
// 5 digit ISO code with lang - country
Gleap.setLanguage({
languageCode: "en-US",
});You can call
setLanguage before or after Gleap.initialize(); after initialization the widget switches language immediately (SDK 17.0.0 or newer).
