How to teach an assistant to provide answers in multiple languages
You can teach a virtual assistant to understand and communicate in other languages.
Adding a new language
If the assistant has been created in only one language so far, you can add the new language (locale) in settings. The available languages can be seen under the gear icon in the Virtual assistant's locales section.

Here you can add other languages to the assistant (Add new locale).

When a new language is added, the Assistant languages are displayed in the Outputs, Intents, Entities, and Data tables in the Virtual Assistant Training sub-views and can be switched between them. At this point, the assistant is already able to automatically detect one of the languages attached to it and switch to the communication accordingly if the user has mentioned a few words of that language in a conversation. However, if no additional work has been done, only output identifiers will be displayed in the conversation.
Further development of the scenario is possible in two ways:
- one-language assistant, who understands other languages: The assistant determines the language of the user's communication, responds that the information in that language is not yet available, and continues in the basic language of the conversation.
- multilingual assistant - data is translated, and the assistant freely communicates in all the added languages.
A one-language assistant who understands other languages
If you do not plan to translate all the assistant's knowledge, but you want the assistant to provide an informative answer to the user who asked the question in another language that the information is not available in that language, you should introduce minor additions to the scenario.
- In the scenario, find the transition with the lowest priority, usually unconditionally designed (with no intent added).

- Find its answer in Outputs, switch to the new language, and type the answer to the relevant answer identifier that will be displayed if the user asks a question in that language.
- In the scenario view, add the Save in Context action to an answer. In it, specify that, after responding to another language, the assistant continues in the main language of the conversation
For example:
Context ID: @@locale
Type: String
Value: lt-lt
Publish the scenario and output.
When the user starts speaking in another language, the virtual assistant will detect another language and switch to it, provide an informative response and go back to the basic language.
When deploying an assistant to the website, it reads the value`s lang attribute in the HTML elements of the website. If the value corresponds to one of the languages associated with the assistant, the assistant will start a conversation with the user in the website language.
If you still want to preserve the assistant's ability to start a conversation in the basic language (Lithuanian), even if it is included on the Russian or English website, you should at the beginning of the scenario use the action Save in context and set the locale to basic language (lt-lt).
Context ID: @@locale
Type: String
Value: lt-lt
Multilingual assistant
If you plan to translate all virtual assistant scenarios to the new language, localize values for outputs, intents, entities, and data tables.
You can check data in the new language by switching outputs, intents, and entities to the desired language and by testing a conversation in the chat window. You can test the data in the new language by switching the outputs, intents, or entities in the desired language and trying the conversation in the chat window.
You can also test the accuracy of determining intents for individual word combinations (for example, by testing if button names will be recognized in a conversation) before publishing new data by switching to the desired language in the intents view and clicking Other/Intent detector test.

After entering and publishing the new data, if the user starts speaking in another language in the conversation, the virtual assistant will understand it and continue the communication in the new language.
No additional changes need to be made to the scenario. When you deploy the assistant to the website, it reads the value of the lang attribute in the website's HTML elements. If the value matches one of the languages associated with the assistant, the assistant will start a conversation with the user in the website's language.