Start a conversation

Forcing Language Localization in Messenger Added to a Website or App

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.

Back to top


 

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.

 

Back to top


 

Solution

  1. Sign in to Kayako and go to the admin panel.

  2. Under Messenger, click Configure

    2.png

  3. Go to the Embed code tab then click the Copy embed code button.

    3.png

    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.

  4. 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.

  5. 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.

Back to top


 

Confirmation

Once this code is added to your website or app, it will enforce the language you have set for your messenger. 

 

Back to top

 

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. ATLAS

  2. Posted

Comments