What is the best way to create a multilingual chatbot?

Nice idea :slight_smile:

What you could do is store that preference somewhere on the phone/device and send it via a hidden payload every time the user opens the app.

You surely have a send() function to send you message. At the app startup, you could send something like this:

send('/set_language{"language": "' + saved_language + '"}')

Of course this means you’d need to have an intent set_language with at least two examples with entities, and have the slot autofilled.

This could also double up as a way to let the bot start the conversation, if you do

send('/greet{"language": "' + saved_language + '"}')

with a rule to greet back.


In my country, people usually mix up 3 languages when they talk, even in a same sentence. So my approach was to first ask the user which language they want, then only reply in this language (until user asks to change it again).

But the user will still be able to understand all languages. If you take a look at some of my bot’s NLU data, you can see 5 languages in a same intent, sometimes all mixed up in one example.


Most responses come from the custom actions, which dispatches the message according the language slot (this can now be done without custom actions via conditional response variations).

But, basically, not all responses are implemented because the bot is unfinished :slight_smile: This bot was just a proof-of-concept for a bot that is privatized by a company.

1 Like