π 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
Language | Code | Language | Code |
---|---|---|---|
English | en | Portuguese (Brazil) | pt-br |
Danish | da | Dutch | nl |
German | de | Norwegian | no |
Spanish | es | Romanian | ro |
Estonian | et | Russian | ru |
Finnish | fi | Slovak | sk |
French | fr | Swedish | sv |
Hungarian | hu | Simplified Chinese | zh-CN |
Italian | it | Traditional Chinese | zh-TW |
Japanese | jp | ||
Korean | ko | ||
Lithuanian | lt | ||
Polish | pl |
π Support
Need help? Hereβs how to get assistance:
- Log in to your Userback workspace.
- Click the Help Center icon in the top-right corner.
- Select Contact us to start a chat with our support team.
Updated 12 days ago