Internationalize your widget
The widget and portal support 11 languages. Learn how the language is detected, how to set it with the locale option, and how to translate your own Messenger text.
The widget and portal detect each visitor's language and show all interface text (buttons, labels, placeholders) in it. This article lists the supported languages, explains how the language is chosen, and shows how to set it yourself.
Supported languages
Code | Language | Direction |
|---|---|---|
| English | Left to right (default) |
| German | Left to right |
| French | Left to right |
| Spanish | Left to right |
| Arabic | Right to left |
| Russian | Left to right |
| Portuguese (Brazil) | Left to right |
| Chinese, Simplified | Left to right |
| Chinese, Traditional | Left to right |
| Dutch | Left to right |
| Polish | Left to right |
Codes are not case-sensitive, so the widget's locale option also accepts pt-BR, zh-CN, and zh-TW.
How the language is chosen
The widget and portal pick a language in this order:
- URL parameter:
?locale=froverrides everything else. - Widget SDK option: the
localeyou pass toinit(see below). - Browser language: the browser's
Accept-Languageheader. - English: the fallback when nothing matches.
Region subtags are dropped automatically, so a browser sending fr-FR gets fr.
Note: Chinese is matched by script rather than region: tags that resolve to Traditional script (
zh-TW,zh-HK,zh-Hant) getzh-tw, and everything else underzhgetszh-cn.
Set the language in the widget
Pass locale when you initialize the widget:
Quackback("init", {
locale: "de",
});The widget renders in German right away.
Tip: If your app lets users choose a language, pass their choice here so the widget matches the rest of your product, whatever the browser reports.
Translate your own Messenger text
Interface text is translated for you. Text you write yourself is not. To show your Messenger welcome and offline messages in other languages, add them under Translations in Settings > Support > Channels > Messenger.
Portal language
The portal reads the browser's language and switches automatically. There is no admin setting to configure. Visitors on Arabic get a right-to-left layout.
Test a right-to-left layout
Add ?rtl=1 to a portal URL to force right-to-left rendering:
https://feedback.example.com/?rtl=1This is a testing tool only. In normal use, right-to-left layout turns on automatically for Arabic. Do not use it in links you share with users.
Related articles
Was this helpful?
Your feedback shapes what we write next.
