If your bot is having conversations in a language other than English, you can translate its Webchat UI to match. This includes the bot’s greeting, buttons, and any other text that appears in the Webchat window.
You will need:
- A published bot
- Knowledge of CSS
For the purposes of this guide, we’ll translate the bot’s Webchat UI to French. However, you can use the same steps to translate your bot’s webchat UI into any language.
Visual learner? Check out our YouTube guide on translating your bot.
Step 1: Translate elements from Dashboard
You can translate some elements of the Webchat UI directly from your bot’s Webchat settings in the Dashboard:
Name and description
To translate the name and description of your bot, modify the Bot Name and Description fields:
Composer placeholder
To translate the placeholder text in the Composer, modify the Composer placeholder field:
Step 2: Translate elements with CSS
Other elements of the Webchat UI need to be translated using CSS. To modify Webchat’s built-in CSS classes:
- Open your bot’s Webchat settings in the Dashboard.
- Select the Theme tab, then scroll to the Styles section.
- Copy and paste the CSS snippets below into the Styles section, then modify the highlighted lines as needed.
For a full list of Webchat CSS classes, check out our guide on styling Webchat.
New conversation modal
You can translate the modal that appears when a user restarts a conversation:
Just copy and paste the following CSS to the Styles section of your bot’s Webchat settings, then modify the highlighted lines as needed:
“Today” label
You can translate the “Today” label that appears in a Webchat conversation:
Just copy and paste the following CSS to the Styles section of your bot’s Webchat settings, then modify the highlighted lines as needed:
Your bot’s Webchat UI is now translated!