It's easy to create a multi-language chatbot with Joonbot; no coding is required!
You can create chatbots in any languages you want. Even right to left languages!
However the translation is on your side, you have to write the different language versions of the chatbot.
When someone starts talking with your Joonbot, you can automatically display a specific language using the browser language or ask the user in which language he wants to continue.
You'll find in this article how to do it.
Option 1: Ask the user
At the beginning of the conversation, you can ask the user in which language he wants to continue the conversation.
To do this kind of bot:
- Choose the languages you want your bot to speak.
- Create the first question asking for language preference by using the button block.
- Create the bot's conversations in every language you need.
Option 2: Use the browser language
In this case, no need to ask the user the language. The bot will speak directly the language you want, depending on the browser language.
1. Get the language detected by the browser
Thanks to our hidden fields feature, you can get the browser language and send it to Joonbot.
All you need to do is to save the browser language as a JB_parameter in your script. This way, you'll be able to reuse the info in the builder.
Let's say you save the browser language in a hidden field called JB_browser_language.
Pro tip: If you are using Shopify, you can get the store's language, which is better than browser language (in our opinion). All you need to do is to add a variable in your script like below.
2. Create a variable with the browser language info
To use the browser language data (JB_browser_language) in a logic jump, you first need to save the info as a new variable within the builder using the "set variable" block.
Let's save the browser language info under the variable name "browser_language".
3. Create a condition on browser language
With the logic jump block, you can create conditions that lead to specific conversation scenarios.
You can create a condition based on the user's browser language, like in the image below.
4. That's all! Congrats!