Languages
Aira ships with two UI languages: English (EN) and Portuguese (PT). Any future language work would be additive.
Setting the language
There are four ways to pick a language, in order of precedence:
- Runtime call —
window.aiSupportWidget.setLanguage('PT')at any time after the widget loads. See Widget JS API. - Pre-load global —
window.aiSupportWidgetLang = 'PT'before the script tag. - Script URL parameter —
?lang=PTon the embed script URL. See Widget Embed. - Project default — set under Settings → Widget inside your project.
Accepted values: 'EN' and 'PT'. Anything else falls back to the project default.
Auto-detection
If none of the above is set, the widget auto-detects from the visitor's browser and falls back to the project default if the detected language isn't supported.
What actually gets translated
- The widget UI (form labels, placeholders, button text, system messages)
- The bot's answers — the LLM is instructed to reply in the chosen language
Your knowledge base content does not get machine-translated. If you want high-quality PT answers, upload PT content. The bot can still answer PT questions from EN sources, but its answers will be translations rather than grounded quotes from your original text.
Mixing languages in one session
Calling setLanguage reloads the iframe under the new language. This is a fresh session, not a continuation — use it on page load or on a user-driven language toggle, not mid-conversation.