Localization of Alarm Messages and Descriptions
The alarm messages and descriptions configured in the 'Alarm Server | Alarms' editor can be translated into other languages. This allows you to create multilingual alarm messages. At runtime, the alarm messages and descriptions can be displayed in the language of the application.
This topic contains the following sections:
- Selecting the default language and target languages
- Translating alarm messages using the 'Resources' editor
- Exporting and importing translations
Selecting the default language and target languages
Precondition for using the localization feature is that a default language and at least one alternative (target) language are set in the 'Options' dialog:- Select 'Extras > Options'.
- Click the 'International' folder and select the 'Default Language Settings' category.
- Choose a 'Default' language.
- Define the alternative languages (target languages to be switched to): In the 'Available' group, select the respective entry and click 'Add Alternative'. The language is added to the 'Alternative' group (shows the list of available national languages in the project). Repeat this step for the desired languages.(You cannot add own languages to the 'Available' group.)
- Confirm the 'Options' dialog with 'OK'.
- Restart PLCnext Engineer to apply the changes.
Translating alarm messages using the 'Resources' editor
The translations of the alarm messages and descriptions are entered in the 'Alarm Server | Resources' editor (editor of the 'Alarm Server' PLANT node).
In the 'Resources' editor, each list entry consists of an ID, name and the source text in the default language and its translations. The ID, the name and the default columns are read-only and created automatically from the entries in the 'Alarm Server | Alarms' editor. The names are created from the 'Alarm ID' in the format <Group Name>.<Alarm ID>.Description resp. <Group Name>.<Alarm ID>.Message.
The default language and each alternative language (identified by its language code) is represented by a single column. Which alternative languages are available depends on the selection you have made in the 'Options' dialog (see the description above).
To enter a translation string, enter the text in the corresponding language column and confirm with <Enter>.
Exporting and importing translations
To export the translations entered in the 'Resources' editor to a csv file, click the icon on the toolbar, specify a location and file name in the file open dialog, and click 'Save'.
Note
The delimiter (for example, comma or semicolon) used for the csv file is taken from the list separator setting defined in the Windows regional settings. |
You can now edit the csv file in Excel or in any other text editor and then re-import the file (the following figure shows an exported csv file opened in Excel).
When editing the csv file, observe the following:
- Only the entries in the target language columns may be modified or added (in the following example, the columns "de" and "fr"). Do not modify any other existing values.
- No new rows/columns may be added; no existing rows/columns may be deleted.
To import text translations from a csv file back into your project, click the button on the toolbar and select the edited csv file in the 'Open' dialog.