Skip to content

Language

By default the client uses English as it's default and fallback language.

Default means, English is used when the browser / environment uses an unknown language. Currently we support German, English, French and Spanish. If another language is requested the client will use English. Fallback means, that if a string is not available in the currently used language, the English translation will be shown.

On start up the client tries to determine the language of the environment (e.g. browser) and uses its configured language. So if a German browser is used the language automatically is set to German. The user can manually switch the language in the settings of the client.

Client Configuration

Customers should set the default- and fallback language based on the language that is used in their configurations. As long as the configurations are written with english strings nothing needs to be changed. If configurations are written, for example, in German the settings should be set to that language.

Example, set to German:

{ // config.js
  [...],
  i18n: {
    fallbackLanguage: "de",
    preferredLanguage: "de"
  },
  [...]
}

Server Configuration

Insight allows customers to specify custom translations. These can be added in the insight server config folder at configuration/insight/i18n. If the default languages of insight are sufficient nothing has to be added.

Define custom translations for existing languages

It is possible to extend the existing translation with customer specific keys/strings which then can be used in configuration files. To override default translations in insight the customer has to create an customer locale file and add it to the i18n folder. The file should have the structure locale.XX.customer.json with XX replaced by the language the customer wants to override (one of en, de, fr, es). The customer can add multiple locale files.

To get the default locale file from insight select the language you want to download. Afterwards navigate to the settings page on mobile and click the download current language button. On web you can click the "download current language" button when opening the more menu in the upper right corner.

To add own translations add your own keys, maybe prefixed with your company name, to the customer.json-file. The file should have the following structure.

Example:

{ // locale.de.customer.json
    "RODIAS_LANGUAGE_KEY": "Übersetzung in Deutsch",
    "LANGUAGE_KEY_2": "Andere Übersetzung in Deutsch",
}

You can then use the defined key in your tree configurations.

Example:

{ // client-config.json
  [...]
  "menus": [{
    "label": "RODIAS_LANGUAGE_KEY",
    "icon": "icon-open",
    "action": "kibanaOpen",
    "actionValues": [{
      ...
    }]
  },
  [...]
}

Add new languages to inisght

To add a new language to insight the user should create a new customer locale file described here but instead of using one of the existing language codes use the one of the new langauge (e.g. ru for russian).

To make the new language available in the insight language picker a mappings.json file has to be created in the i18n folder. The mapping contains the locale (e.g. de_CH) and the two letter code. All two letter codes which exist in the mappings.json will be available as languages in insight.

If you add a new language please get in touch with us, so we can add the language to the default list of languages Insight is delivered with.

Example with added russian language:

{  // mappings.json
    "en_US": "en",
    "en_UK": "en",
    "de_DE": "de",
    "de_CH": "de",
    "fr_FR": "fr",
    "es_ES": "es",
    "ru_RU": "ru",
}

Remove language from insight

To remove one of the default languages from insight you can add a mappings.json to the i18n folder and remove the unwanted languages.

Exsample with only spanish locale

{ // mappings.json
    "es_ES": "es",
}