Languages

The DialoX platform can support multiple languages on the same bot. There are multiple ways to configure your flows to allow users to switch language and/or allow for conditional behaviour based on the language of the conversation.

A bot can only support one language at any given time per conversation.

Languages

But first, it is important to understand that languages play a role on three levels:

  • Bot

  • User

  • Conversation

Language of the bot

When configuring your bot, you need to define in which languages your bot is able to converse. The first language is considered to be the main language of the bot. It will fall back to this language when your bot doesn't support the user's preferred language.

When working with flows, the main language of the bot can be found in the built-in variable Bot language.

Language of the user

When the user engages with DialoX, the system will try to identify the language of the user as best as possible using channel specific logic.

Channel
How to determine the language?

Phone

The user language will be derived from the country codes of the ISO 164 phone number format. When multiple languages are possible in any given region, it will pick the most dominant language.

WhatsApp

Initially same as for phone, but then takes the first user message (when it is a complete sentence) to detect the real preferred language of the user.

Web

The user language will be derived from the browser settings.

Facebook

The user language is provided by the Facebook platform, but then takes the first user message (when it is a complete sentence) to detect the real preferred language of the user.

Instagram

The user language is provided by the Instagram platform, but then takes the first user message (when it is a complete sentence) to detect the real preferred language of the user.

The preferred language of the user will be stored in the built-in variable labeled as User language.

Language of the conversation

When the conversation starts, the platform will first try to identify the language preference of the user, see the paragraph above.

Then it will determine if this language is supported by the current bot and take it if so.

If not, it will take the bot's main language as the conversation language.

The conversation language is then remembered in the Conversation language built-in variable.

Flow conditions based on language

Flow logic can be made conditional using so called conditions. Read the conditions page for more information about this topic. Flow conditions can use either tags or variables. For conditional logic based on the current conversation language this means:

  1. Language tag

  2. Built-in variables

Language tag

Built-in variable

As you have been reading in this article there are three built-in variables that represent a language. The language used in the current conversation is available as Conversation language in the Variables side panel. It will hold the ISO 639 representation of the language code of the language that is currently active for this conversation, like 'nl', 'en', 'de', etc.

Using the expression builder you can define a condition that compares the value of this variable to a given language code. In the below example it will check if the current conversation is held in Dutch OR in English.

Last updated

Was this helpful?