Skip to content

MindSphere Web Components
Internationalization

MindSphere Web Components support different locales via the locale property. They provide the locales en and de by default and allow developers to add or modify locales using the localeManager.

The localeManager provides the following methods for reading, overwriting or defining new i18n texts of MindSphere Web Components:

Member Description
getLocaleSettings(): any Returns the locale settings of the component. Use this method to determine translatable texts and check the current locale settings of the component.
addLocale(LocaleName: string, settings: any) Defines a new locale and provides an object with translated texts.

Info

The locale attribute is available for all MindSphere Web Components, but some components (e.g. Map) do not contain any translatable texts.

Snippets

Change the default locales

1
2
3
4
5
// displays the component in German
ruleComp.locale = "de";

// displays the component in English
ruleComp.locale = "en";

Create a new locale

In the following example a new locale fr is defined for the asset view and the search text is overwritten in French.

1
2
// displays the component in German
ruleComp.locale = "de";
1
2
// displays the component in English
ruleComp.locale = "en";

ChangedLocale

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.