You can configure your bots to work in the multiple languages your customers from around the globe are comfortable with. You can identify the language in which your bots need to provide localized support 

  • based on the locale, website, or browser language — the bot language will automatically switch to the right language.
  • based on the customers' choice of preferred language — the bot language will be forced to switch to the specified language.


Changing the bot’s language based on the Locale parameter

            For the self-service widget:

  • Navigate to the Deploy screen of your bot, and select the Self-service widget option from the Deploy options dropdown
  • From the set of default properties, enable the default language parameter. This will include the "cstmr::lng" parameter in the script that is generated.

  • You can prefill it with the language you need the bot to load in.
  • Select the language from the dropdown to force the bot to load in just that language.
    • In this example, the deploy code will include "cstmr::lng": "ar" where ar denotes Arabic, the language you have hardcoded into the widget.
  • If you are identifying the language from the browser or the website, save that value to a variable and pass it to the widget deploy code by including it in the widget deploy code.
    • In this example, the deploy code will include "cstmr::lng": "lang_var" where lang_var denotes the variable you use to save the language used.
    • The bot will load the deployment script with the variable whose value will be prefilled by the customers' language preference.
  • You can also add translations for the Title and Subtitle of the widget from the 'Customize' page

            For the conversations widget:

  • You will need to include the language locale in the widget deploy code. 
    • For example, use locale: "fr" in your deploy code to deploy the widget in French.
  • You can also use a variable instead of the language code to denote the variable you use on your website or the browser to capture the customer's language preferences.

Changing the bot’s language based on user preference

  • Create a new message in the flow, and ask the customer which language they would prefer.
  • Click the +Get Response button > choose Language > and pick the languages you wish to show your customers.

  • Based on their choice, the bot will save the language parameters for the specified language. This can be later used anywhere else in the bot flows.

Related articles: