×
Skip to main content Link Search Menu Expand Document (external link) Right Arrow

Contents

Translations

Click on  Localization to open the menu. The button is located in a Text element’s input field and input fields Page Name and Description. An example of the Localization menu is represented in the figure below.

Localization menu

Fig. 1. Localization menu

Each Text field of the menu corresponds to a Portal (HMI View) locale which you can choose in Portal (see Personal Cloud Profile).

Enter the translations in the Text column of the menu. Choose the language in the Personal Cloud Profile to display the translated text.

Translation table

Translations are contained in a special table that lists terms as keys, which can be used as the i18n function arguments. To open the table, click on  Options in the right-side header and go to LocalizationAdd translation. Alternatively, there is a keyboard shortcut: Ctrl + Shift + L. Figure below illustrates the table.

Translation table

Fig. 2. Translation table

The i18n function

The i18n function is another way to translate elements into different languages. You can call this function from the Expression Editor. The function has the following syntax:

i18n ("key", "locale")

The argument key defines the key from the Translation table or one of the Text elements with translation configured via the Localization menu. The argument locale defines the language to be displayed. If not set, this argument corresponds with the current Portal locale.

You can use an interactive help tool when typing the key argument. Type quotation marks and place the cursor between them, then press Ctrl + Space combination to open the list of available keys. As you can see in the figure below, there are custom key names configured in the Translation table and the keys generated by the system.

List of keys

Fig. 3. List of keys