Configuration of Dynamic Language Switching

You can control dynamically which text (also alarm message text in an alarm table) will be displayed in a visualization element resp. as tooltip of an element in online mode by using Prefix-ID-combinations, each pointing to another text defined in a XML file.

For this purpose a XML-file describing the text assignments must be linked to the project in the configuration of the visualization ( ‘Extras’ ‘Settings’). The XML file must have a certain format. A language code is added to the particular  texts, thus later you not only can switch between different text contents but also language switching is supported.

In the configuration of a visualization element, for which the text display should be switched dynamically, Prefix and ID are entered (see below) whereby the ID can be provided by a project variable. A default language can be defined via an INTERN command (LANGUAGE DEFAULT).

Set the following entries in the different configuration dialogs of a visualization:

  1. Link the XML file(s) and choose the (start) language: Dialog ‘Settings’ category Language:

    Activate option Dynamic texts and press Add, in order to link one or several XML files, which are available on your system, to the project. The selected files will be listed in the window below the button. Press Delete if you want to remove a selected file from the list. If you want to get displayed just those visualization elements, for which a dynamic text replacement is done, then activate option Hide elements, if no text replacement took place.

    Selecting one of the language identifiers offered in the selection list at field Language will cause the display of those text versions (for the corresponding prefix-ID-combination) which are marked with that language identifier in the XML file.

    Configuration dialog Settings, category Language, for dynamic texts:

    ../_images/a478a8505e16b2360a317f3452780cf7
  2. Specify the ID (as used in the xml-file) in configuration dialog ‘Variables’ in field ‘Textdisplay’ resp. ‘Tooltip-display’:

    Enter a value (number) resp. a project variable which should define the ID of a text (as used in the XML-file).

    In case of message texts of an alarm table, the ID must match the respective line number in the table .

  3. Define the text format in configuration dialog ‘Text’ resp. ‘Text for tooltip’:

    In the Content field, insert a placeholder “%<PREFIX>” at that position of the text, where you want to get displayed a dynamic text in online mode. Instead of “PREFIX” you can enter any string matching with a PREFIX-definition used in the XML textlist. See the description for the ‘Text’ configuration dialog.

For each prefix-ID-combination, which is found in a linked XML file, the assigned text will be displayed in the visualization element in online mode. If no appropriate entry is found, no replacement will be done.