Skip to main content
All CollectionsInstallationAdvanced Installation
How to Switch the Userback Widget Language with the JavaScript SDK
How to Switch the Userback Widget Language with the JavaScript SDK
Jon avatar
Written by Jon
Updated over a week ago

The Userback JavaScript SDK allows you to set widget options, including the ability to change the language of the widget. This allows for dynamic language selection based on the user's preferred language or location, multi-language support for different pages, and personalized experience based on user preferences or account settings.
The JavaScript SDK is only available on certain plans. If you're unsure if you have access to this feature, check out this article or chat with Userback support team for more information.

To change the language of the widget, you will need to use the widget_settings object and specify one of the supported language codes.

Userback.widget_settings = {language : "en"}

Here is an example of how to change the language of the widget to French:

<script>Userback = window.Userback || {};Userback.access_token = '[your widget token]';Userback.widget_settings = {language: "fr"};(function(d) {var s = d.createElement('script');s.async = true;s.src = '';(d.head || d.body).appendChild(s);})(document);</script>

After making this change, the Userback widget should now be displayed in French.

Please be aware that this is just an example, you will need to use your own widget token and the settings that are appropriate for your implementation.

Supported Language Codes

  • en: English

  • da: Danish

  • de: German

  • es: Spanish

  • et: Estonia

  • fi: Finnish

  • fr: French

  • hu: Hungarian

  • it: Italian

  • jp: Japanese

  • ko: Korean

  • lt: Lithuanian

  • pl: Polish

  • pt: Portuguese

  • pt-br: Portuguese (Brazil)

  • nl: Dutch

  • no: Norwegian

  • ro: Romanian

  • ru: Russian

  • sk: Slovak

  • sv: Swedish

  • zh-CN: Simplified Chinese

  • zh-TW: Traditional Chinese

Available on Company and Premium Plans

Did this answer your question?