no-translate

Set up localization

Define widget language through the API.
Napisany przez Konstantine
Zaktualizowano 10 miesięcy temu

HelpCrunch chat widget has been already localized into several languages (GE, FR, ES, PT, RU, PL) — both for online and offline modes. You can also add your own phrases and localizations.

Create a phrase list

STEP 1. To localize the text into a new language, log into your HelpCrunch account and go to Settings → Website Widgets → Your Website → 'Localization' tab and click the 'Add localization' button.

STEP 2. Name the new Phrase List by indicating the language you need — for example, Dutch (NL). If you want to show this localization by default, check the corresponding checkbox.

STEP 3. Fill in all the fields with new phrases in the corresponding language and hit 'Apply' to save changes.

Go to your website and reload the page to switch the chat into the chosen language.

Choose default localization

After you mark one of the localizations as default, and disable unsuported languages in the list there are two different options:

  • You can define which localization you want to display for which pages. For example, display French localization for www.yourdomain.com/fr and Russian localization for www.yourdomain.com.ru
  • Display localizations based on the visitor's browser language. In case if visitor has some browser language that's not supported by your team (disabled in the list of localizations)  - the default one will be displayed

Define localization for a specific page(s)

STEP 1. First of all, you need to name your phrase list with a two-letter standard code (let’s say 'en' for English). Check the full list of ISO 639-1 codes if you need help with names.

STEP 2. Add the following command to the chat widget JS code on your website:

HelpCrunch('setPhraseList', 'en');

Now the chat widget phrases will be automatically displayed in English — or any language you set.

Define localization automatically based on the visitor's language

You can automatically detect a visitor’s browser language and display your chat widget in the correspond

ing language:

STEP 1. All the phrase lists should be named with the help of the two-letter standard language codes (full list of ISO 639-1 codes).

STEP 2. Add the following command to the chat widget JS code on your website:

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

Now, you don’t have to switch localizations manually. The chat widget phrases will be automatically selected from available localizations and displayed in the visitor’s language.

Right-to-left text language support

You can localize your HelpCrunch chat into a right-to-left (RTL) language.

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')

Czy odpowiedzieliśmy na Twoje pytanie?