Localization
33 UI locales, locale strategy, runtime language switching, and content fallback
The widget ships 33 UI locales. Operator-authored content (greetings, prechat labels, messenger title) renders verbatim in whatever language you wrote it; the widget chrome (buttons, system strings) is translated automatically.
Locale strategy
localeStrategy decides which language a visitor sees by default:
| Strategy | Behaviour |
|---|---|
AUTO (default) | Follow the visitor's navigator.language. |
WEBSITE | Follow the host page's html lang attribute. |
DEFAULT | Pin every visitor to defaultLocale. |
Set it under Content → Languages in the Brand editor, or pass it in the embed config.
Effective locale resolution
For any given visitor, the active locale is resolved in priority order:
- The visitor's Profile-tab language pick (when the Profile tab is enabled).
- A host pin — Web Component only:
<wexio-widget locale="...">. - A
?lang=URL parameter (used by the iframe embed). - The operator's
localeStrategy. defaultLocale(falls back toen).
The result is normalised against the supported list: a region-tagged code matches exactly first (en-US, pt-BR, zh-TW), otherwise it falls back to the base language, and finally to en.
navigator.language | Resolves to |
|---|---|
en-US | en-US (exact) |
en-AU | en (base) |
pt-BR | pt-BR (exact) |
pt-PT | pt (base) |
zh-TW | zh-TW (exact) |
xx-YY | en (default) |
Pinning a locale per embed
| Embed | How |
|---|---|
| Web Component | <wexio-widget public-key="pk_live_..." locale="pt-BR">. Changing the attribute live re-renders without unmounting. |
| Script loader | No attribute; inject ?lang=… into the host page URL and the loader forwards it. |
| React | No public prop; uses the operator strategy plus the visitor's Profile-tab override. |
Live language switching
When a visitor changes their language in the Profile tab, the widget swaps message bundles in place — no reload, no remount. The choice is written to a cookie and, for identified visitors, persisted to their profile so it carries across sessions.
Content fallback
Two settings govern translated content (help articles, news):
| Setting | Effect |
|---|---|
supportedLocales | An allow-list of content languages. Empty means no filtering. |
contentLocaleFallback | When true (default), an untranslated item shows the defaultLocale version. When false, it shows a "not translated" empty state. |
The 33 supported locales
en (default), en-US, en-GB, uk, de, es, es-MX, fr, it, nl, pt, pt-BR, sv, da, no, fi, pl, cs, sk, tr, ro, hu, el, ar, he, hi, th, vi, id, ja, ko, zh, zh-TW.