Setting up Multi-lingual Chatbots

A quick guide on setting up multilingual chatbots if you have multilingual webpages.

Wonderchat supports multilingual websites, allowing you to use a single chatbot across multiple languages. This guide demonstrates how to implement a versatile chatbot that works seamlessly with all languages on your site.


Step 1: Configure your chatbot's base language as English

Navigate to your Dashboard and enter the "Edit Chatbot" page.

Once you've entered the "Chatbot Settings" page, go to the "General" tab

Set "English" as the base language. This acts as a universal setting, allowing the chatbot to understand queries in multiple languages and to respond in the user's language automatically.

Note: English is recommended as the base language for multilingual support. However, you can choose a different base language if needed.


Step 2: Customizing Greeting Messages for Multi-lingual Websites

To configure one chatbot to speak multiple languages, adjust the greeting message based on the page language.

Here's how:

  1. Set up your chatbot in the dashboard.

  2. Click on "Embed to Website".

  1. In the embed code, add a data-greeting parameter to override the default greeting:

html Copy<script 
  src="your-embed-script-url" 
  data-greeting="Bonjour! Comment puis-je vous aider aujourd'hui?"
></script>
  1. Use this customized embed code on your language-specific pages.

For example, here is how you can use a French greeting on pages that mainly use the French language.


<script
    src="https://app.wonderchat.io/scripts/wonderchat.js"
    data-name="wonderchat"
    data-address="app.wonderchat.io"
    data-id="f12kfnlkjn312321flkqwjenflkqwjenf"
    data-greeting="Hello there!"
    defer
></script>

The bot will greet with "Hello there!", but if using the script:

<script
    src="https://app.wonderchat.io/scripts/wonderchat.js"
    data-name="wonderchat"
    data-address="app.wonderchat.io"
    data-id="f12kfnlkjnflkqwjenflkqw21323jenf"
    data-greeting="Bonjour!"
    defer
></script>

The bot will greet with "Bonjour", which you can switch this to whichever language in the different language domains of your website.

As long as the greeting message is displayed in the same language of the webpage, your users would be able to interact with the bot in their native language.


Step 3: Embedding onto your multi-language website

You can copy and paste the same widget code, and make edits to the script parameter (data-greeting="Hello there!") to reflect the greeting in the language of your choice.


If you have any more questions, feel free to reach out to us at support@wonderchat.io


Last updated