FAQ: Can I program the widget to use different languages?
Today’s website visitors come from all over the world, and speak many languages. If you notice a sharp uptick in visitors from certain countries (for example, in Analytics > Chat > Visitor Information) it may be the right time to start interacting with those visitors. In this article, we’ll build a Business Rule so that the widget language changes based on the visitor’s country.
In this article:
- Supported Languages and Default
- How to Change the Widget Language Based on Conditions
Supported Languages and Default
Currently, the widget supports the following languages:
- English (UK)
You may set the default widget language in Settings > Messenger Setup > Languages. Learn more about setting languages and message translations.
Use Default Chat Widget Language to change the language displayed in the chat widget (visitor facing). Use Application Language to change the language displayed in the platform (agent facing).
How to Change the Widget Language Based on Conditions
Visitors may be viewing your site from anywhere in the world. With Business Rule’s location-based conditions, you can easily manage the language that fits your business and visitor needs best.
To get started, go to Settings > Workflows > Business Rules and click on ‘New Rule’.
Fill out the New Business Rule form, making sure to select Chat as the Channel and On Visit as the trigger type.
Then, click ‘Create’ to be brought to the workflow page.
Click on the plus sign (‘+’) beneath the branch to add an action. Let’s change the language of our widget based on two conditions.
First, select ‘Action Group’.
Then, choose ‘Add a Condition’.
Name and describe the condition, and then choose ‘Any of’ from the drop-down menu.
Choose ‘Visitor Country’ and select the countries for this condition. In this example, we’ve created a condition to detect visitors from Spanish-speaking countries.
Use the ‘Any of’ condition to specify visitor countries. In order for the system to detect accurately, the visitor should have cookies enabled.
You’ll now have a new branch with ‘Matched’ and ‘Unmatched’ conditions. Click on the plus sign under matched conditions and select ‘Set Widget Language.’
Then, select the appropriate language from the dropdown menu.
Leave the ‘Not Matched’ condition blank. That way, if the visitor is not from a Spanish-speaking country, the widget will display its default language.
You may set additional country conditions and languages for the other action group.
The widget will now display Spanish text when it detects Mexico or Spain as the visitor’s country.
Cookies aren’t always a reliable way to grab customer information. If you’d like to make sure a visitor comes from a certain country, you can also use a pre-chat form to capture this kind of data.
Need help? Reach out to us at firstname.lastname@example.org.