🌐 Dynamic Language

Overview

Provide a seamless user experience by dynamically adapting the language of your Userback widget to match your application's configuration or user settings.

Prerequisites

Before you start, ensure the following:

  • Userback Workspace: A workspace is required to manage feedback.
  • Userback Widget Installed: Follow the Widget Installation Guide to set up the widget.
  • Plan Availability: Available on all plans.

🚧

Custom Text & Translation

Custom text set in the widget settings won’t auto-translate. If you need advanced customization or multi-language support, reach out to us for tailored solutions.


Basic Usage

Dynamically Configure Language Settings

You can set the widget's language dynamically using widget_settings.

Userback.widget_settings = {
    language: "en" // Replace "en" with any supported language code
    // ... additional settings can be placed here
};

Note: Use valid language codes (see the full list below).


Common Use Cases

Default Language Setting

  • English:

    Userback.widget_settings = { language: 'en' };
    
  • French:

    Userback.widget_settings = { language: 'fr' };
    
  • Simplified Chinese:

    Userback.widget_settings = { language: 'zh-CN' };
    

Advanced Use Case

Dynamic Language Switching

In multi-language applications, switch the widget language dynamically based on user preferences.

function changeLanguage(lang) {
  Userback.destroy(); // Destroy the existing widget
  Userback.widget_settings = {
    language: lang
  };
  Userback.init(); // Initialize the widget with the new language setting
}

// Example Usage
changeLanguage('es'); // Switch to Spanish

Supported Language Codes

LanguageCodeLanguageCode
EnglishenPortuguese (Brazil)pt-br
DanishdaDutchnl
GermandeNorwegianno
SpanishesRomanianro
EstonianetRussianru
FinnishfiSlovaksk
FrenchfrSwedishsv
HungarianhuSimplified Chinesezh-CN
ItalianitTraditional Chinesezh-TW
Japanesejp
Koreanko
Lithuanianlt
Polishpl

πŸ›Ÿ Support

Need help? Here’s how to get assistance:

  1. Log in to your Userback workspace.
  2. Click the Help Center icon in the top-right corner.
  3. Select Contact us to start a chat with our support team.