How to Add Translations to a Scenario?
When you need to provide support for multiple languages in a bot scenario, adding translations allows creating multilingual dialogs for different audiences. This instruction will help add translations of message texts for different languages.
When Needed
- You need to support multiple languages in the bot scenario (for example, Ukrainian, English, Russian).
- You need to add translations for existing messages in the scenario.
- You need to edit translations for a specific language.
What's Important to Know
- Editing language — language for which you are currently editing message texts in the scenario.
- Translations — alternative message texts for different languages, stored together with the main text.
- Language switcher — component in the scenario editor that allows selecting the language for editing.
Prerequisites
You are logged in with integrator or administrator rights. You have an open scenario editor with messages that need to be translated. You know which languages need to be supported in the scenario.
Step-by-Step Instructions
1. Open Scenario Editor
- Navigate to the Dialog module via
Apps -> Dialog. - Select the bot whose scenario needs to be edited.
- Open the scenario editor via route
/dialog/bot-scenario/:id.
2. Select Language for Editing
- In the scenario editor, find the language switcher (usually located near the "Save" button at the bottom of the screen).
- Click on the language switcher and select the language for which you need to add translations (for example, "English", "Русский").
- The canvas and all texts automatically update for the selected language.
3. Edit Translations for Messages
- Click on the message node for which you need to add a translation.
- In the right editing panel (RightSideBar), find the "Message Text" field.
- Enter or edit the message text for the selected language.
- Changes save automatically or after clicking the "Save" button in the editing panel.
4. Add Translations for Keyboard Buttons
- Click on a node of type "Keyboard".
- In the right editing panel, find the list of keyboard buttons.
- For each button:
- Click on the button to edit.
- In the button text field, enter the translation for the selected language.
- Save changes.
5. Check Translations for All Languages
- Switch between languages through the language switcher.
- Check that all messages and buttons have translations for each language.
- If any text is missing for a certain language, add it.
6. Save Changes
- After adding all translations, click the "Save" button at the bottom of the screen.
- The system saves all translations for all languages.
- A success message appears.
What Happens After
All translations are saved and the scenario is ready to use with support for multiple languages. The bot will automatically detect the user's language and display corresponding translations of messages and buttons.
How to Verify It Worked
- Check that translations are saved for each language — switch between languages and check texts.
- Make sure all messages and buttons have translations for all supported languages.
- Try opening the scenario again — all translations should be saved.