Overview
Kayako Messenger automatically changes to the user's language preference if you have enabled it for your Help Center. The language translation, however, may not take effect if your Messenger is added to an external website or app. You can fix this behavior by configuring the messenger to force a language on a website or app.
Diagnosis
If you are hosting your Help Center through your external website or app and have added the Kayako Messenger feature to it, you may need to customize the code to override the messenger options or behavior such as forcing it to use a certain language.
This developer guide page shares the configuration options you can use to change the messenger layout and behavior.
Prerequisite
- To edit or access the messenger configuration, you will need an administrator account with the 'Manage channels' permission.
- Working knowledge of the Javascript and HTML programming language.
Solution
-
Sign in to Kayako and go to the admin panel.
-
Under Messenger, click Configure.
-
Go to the Embed code tab then click the Copy embed code button.
NOTE: If you have not configured your Messenger feature yet, you can read more about it in the article Enabling Real-Time Support with Kayako Messenger.
-
Paste the embed code you copied from Step 3 somewhere (e.g., Notepad), and add the following code snippet right below it:
<script type="text/javascript">
setTimeout(function () {
kayako.ready(function () {
kayako.config = {
forceLocale: 'languageshortcode'
}
})
})
</script>NOTE: Replace the language shortcode with the actual language code (e.g.,
ar
for Arabic,fr
for French, etc.). See the list of language codes you can use from this ISO Language Code Table. -
Copy the entire code and paste it into your website or app.
NOTE: Contact your development team if you need assistance with adding the code to your website or app.
Confirmation
Once this code is added to your website or app, it will enforce the language you have set for your messenger.