Question
How do I manually set the language of my Web Widget (Classic)?
Answer
The widget language is set automatically by default based on the customer's browser. To manually set the language of the widget instead, follow the directions below for the widget you have on your account.
If you use the Web Widget (Classic) with a Support account
To customize the Web Widget (Classic) so that it always appears in a specific language regardless of your customer's browser language, use the setLocale command as in the example below.
<script type="text/javascript">
zE('webWidget', 'setLocale', 'LANGUAGE_CODE');
</script>
For more information, see the developer documentation for the setLocale settings. For a complete set of instructions, see the article: Advanced customization of the Web Widget (Classic).
If you use a chat-only Web Widget (Classic) account
To set the language for a Chat-only Web Widget (Classic), you will need to use custom code. See this guide in our developer portal for more information: Changing the widget language for chat-only accounts.
7 comments
Francois Spinnael
How can we force the webwidget to look only in 1 language ?
Because this remark says that it looks into all the languages if I understand it correctly... But in zendesk guide we can't give different tags/labels for different languages...
Note: Setting the language via API does not extend to the Help Center search within the widget. The search matches the keywords used across all the Help Center languages. For example, the language of the widget is set to Dutch but the Helpcenter does not contain any Dutch content. The widget tries to match results in a different language supported, for example French, and serves French results instead.
What we want is forcing the WebWidget to look into the helpcenter language that we have choice. What is the solution for that? (Because it seems that zendesk is only doing it for some languages and that a huge blocking factor)
0
Shai Sy Dimayuga
Hi Francois S,
A ticket has been created on your behalf and someone from our Support Team will contact you back regarding this via email.
Cheers!
0
Dale Gordon
Hi! I need a way to set the locale of the web widget on launch, so that it loads with the correct locale from the beginning. At the moment it loads in English only to be changed after that. It would be very helpful if that could be set from initialization.
Also, please open another ticket to allow the manual setting of mobile mode. We have a use case where the user can select either desktop or tablet mode and we wish for the support widget to follow suit.
0
Dale Gordon
Shai Sy Dimayuga
0
Dane
You can customize the widget so that it always appears in a specific language using the setLocale command. This command sets the language for only the widget and doesn't override your host page’s language.
0
Dale Gordon
Hi Dane. Thanks for getting back to me.
I can get it to setLocale after initialization. I was meaning setting in on load. So that it immediately starts in the correct language.
Another thing I would like feedback on is overriding when it is in mobile mode. I feel that would be a great addition! 🎉
Regards,
Dale
0
Dane
Unfortunately, only setLocale is available for the widget. The feature setLanguage was available only for Legacy Chat. But thank you for the feedback we'll definitely have a look into it.
0