MindSphere Web Components
MindSphere Web Components support different locales via the
locale property. They provide the locales
de by default and allow developers to add or modify locales using the
localeManager provides the following methods for reading, overwriting or defining new i18n texts of MindSphere Web Components:
|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.|
The locale attribute is available for all MindSphere Web Components, but some components (e.g. Map) do not contain any translatable texts.
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.
// displays the component in German ruleComp.locale = "de";
// displays the component in English ruleComp.locale = "en";
Any questions left?
Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.