Localize all static strings visible in the SDK Components.

If you notice any missing strings, please reach out to us.

Steps

1

Download the list of static strings

Get the complete list of strings that can be localized here.

2

Translate the strings and create the translations object

  • Translate the strings in the languages you want to support.
  • Create an object with the translations for the languages you want to support in the following format:
{
  "language-code-1": {
    "original string 1": "translated string 1",
    "original string 2": "translated string 2",
    ...
  },
  "language-code-2": {
    "original string 1": "translated string 1",
    "original string 2": "translated string 2",
    ...
  },
  ...
}
3

Provide the translations object to the SDK

Call the setTranslations method with the translations object you created in the previous step.

client.setTranslations(translationsObject);
4

Set the language

Set the language you want to use for the SDK. The language code should be the same as the language code you used in the translations object.

client.setLanguage('en');

Example

// Provide the localization object for the languages you want to support.
client.setTranslations({
  'en': {
    'All comments': 'All comments',
  },
  'fr': {
    'All comments': 'Tous les commentaires',
  },
  // Add more languages as needed.
});

// Set one of the languages you've provided the translations for.
client.setLanguage('en');