Attributes

Internationalization

Attributes that control language and locale settings.

lang

Widget interface language. This attribute is bidirectional: it can be set via HTML and is automatically updated when the user changes language from the chat.

PropertyValue
Typestring (ISO language code)
Default'en'

Supported languages by default: en, it, es, fr, de, pt.

<tolki-chat bot="..." lang="it"></tolki-chat>
<tolki-chat bot="..." lang="es"></tolki-chat>
<tolki-chat bot="..." lang="fr"></tolki-chat>

locales

List of available languages for the language selector in the chat. If the bot only supports certain languages, you can limit the options shown.

PropertyValue
Typestring[]
Default['en', 'it', 'es', 'fr', 'de', 'pt']

Supported formats:

  • Comma-separated list: "en,it,es"
  • JSON array: '["en","it","es"]'
<tolki-chat bot="..." locales="en,it"></tolki-chat>
<tolki-chat bot="..." locales="it"></tolki-chat>
<tolki-chat bot="..." locales='["en","it","fr","de"]'></tolki-chat>