Hello 👋 How can we help?

Localization

Written by Artem
Updated 1 month ago

The following steps describe the localization process by using phrase lists. Also you can use localization for customizing chat texts.

Step 1. Adding localizations and phrase lists

First of all you need to create your Phrase Lists. Go to Settings → Website Widgets → Localization and add a separate Phrase List for each language that you want to support. Then edit each phrase list texts to match the language.
You’ll have English, Spanish, Portuguese, Italian, Russian,French, German, Polish, Ukrainian, Lithuanian, Serbian, Georgian and Dutch languages (already translated) by default upon your registration:

Important note: If you want to enable automatic detection of localization depending on user’s browser language, you should use the two-letter language code as the Phrase List Name.
Examples: en, fr, de, pt, es. (see full list of ISO 639-1 codes)

Step 2. Enabling localizations

In order to enable any exact Phrase List by it’s name you should add the following command (call to a setPhraseList method) to the chat widget js code:

HelpCrunch('setPhraseList', 'en');

If you named all your Phrase Lists with the two-letter language codes, you can add the following command to the chat widget js code in order to automatically detect the user’s browser language and enable the corresponding Phrase List:

HelpCrunch('setPhraseList', navigator.language.slice(0,2));

Right-to-Left text language support

Adding support for HelpCrunch to be localized into a right-to-left (RTL) language, such as Hebrew, is simple. You can also do that on a per page basis, for example if you have both English and Hebrew on your site, you can paste the following code onto RTL pages beneath your existing HelpCrunch code:

HelpCrunch('setRtlDirection')

Did this answer your question?