Browse the docs
Widget
Languages
How the widget picks its interface language, which eight languages it speaks, how agents answer in the visitor's language and how to set up a multilingual site.
Last updated
On this page
Visitors don't all speak the language your website is written in. ASDK handles two kinds of language separately: the widget's own interface, such as buttons and labels, and the agent's answers. This page explains both and how to control them.
Answers follow the visitor
Agents reply in the language the visitor writes in. A visitor who asks in Spanish gets an answer in Spanish, even if your website is only in English. ASDK searches your knowledge in your content's language, so the answer comes from the same pages it would use for an English question, and it cites them as usual.
When the language of a message can't be told, for example "ok?" or a product name, the agent keeps the language of the conversation so far, then falls back to the page's language and finally to your site's.
How well an answer reads depends on the language model's skill in that language. If many of your visitors write in a less common language, test a few of their questions with Try the real widget before relying on it.
The interface comes in eight languages
The widget's buttons, labels, error messages and the contact form are available in:
- English
- German
- French
- Spanish
- Portuguese
- Polish
- Ukrainian
- Russian
Visitors whose language isn't on the list see the interface in English, and the agent still answers in their language. For right-to-left languages, Arabic, Hebrew, Persian and Urdu, the panel is laid out right to left.
How the interface language is chosen
The widget picks the language in this order:
-
The
data-localeattribute on the script tag, orlocaleinwindow.asdkConfigfor tag managers. Use it when your site knows its language, for example on a German page:HTML <script async src="https://cdn.asdk.com/v1/asdk.js" data-site-id="SITE_ID" data-locale="de"></script> -
The page's language, from the
langattribute of yourhtmltag, such aslang="fr". One exception:enis ignored here, because many website templates set it by default even on sites in other languages. -
The visitor's browser language.
Only the base language is used: pt-BR and pt-PT both get Portuguese. To ignore the page language and always follow the browser, set data-locale="browser".
Change the language from your own code
If your site has a language switcher that doesn't reload the page, tell the widget:
asdk("setLocale", "fr");The widget loads its texts in the new language. See JavaScript API.
Your own texts
The defaults of the greeting, message box placeholder, AI disclosure and consent text are translated into the eight interface languages. Texts you write on the Agents page are shown exactly as written, to every visitor, and so are your suggested questions.
For a site with visitors in several languages, you have two options:
- Keep the defaults for the texts, so each visitor reads them in their own language.
- Write texts in your main language, accepting that other visitors see them in that language. The agent's answers are still in each visitor's language.
Separate texts per language can't be set in the dashboard yet.
Multilingual websites
If your website has language versions, such as /de/ and /fr/ sections, ASDK reads all of them by default. That's usually fine: each answer is written in the visitor's language from the best-matching pages.
Two cases where you may want to change it:
- The translations are incomplete or older than the main version. Skip them with Skip pages under, for example
/deand/fr, so answers come from the up-to-date pages. See Exclude pages. - Your plan's page limit is tight. Each language version of a page counts as a page. Reading one language saves room. See Page limits.
On the Pages list of a source, each page shows the language ASDK detected, such as EN or DE.
Fixed messages
A few messages don't come from the language model, for example the reply when your workspace has used up its monthly answers. They exist in the same eight languages and fall back to English otherwise.
Related: Widget texts and greeting, Install with HTML.