Dynamic Language switching
Dynamic texts allow switching between different, always language-assigned text versions for a visualization element. The difference to static texts is that the definite text selection also can be done via a variable used in the application.
In the configuration of the element a Prefix-ID-combination is entered, which is assigned to a text in a XML-file (also named “text list” in the following). The ID can be defined by a project variable.
Example of application: The ID represents an error number, as Prefix e.g. “Error” is used. The language file provides via the Prefix-ID-combination an appropriate error message, which – depending on the currently set language – will be displayed in this language.
Please regard:
- The language files for dynamic texts can be created in Unicode (UTF-16) or ANSI (ISO-8859-1).
- For the Target-Visualization the start language, the directory for the xml-files to be used and a list of xml-files can be defined by the target system. This allows to modify these parameters later without the need of creating a new boot project. Thus, in an easy way existing text lists can be modified (start language, texts) resp. new languages can be added. If the target system is providing such a configuration, the text lists which are defined for the visualization in TwinCAT PLC Control, will not be regarded in online mode! If no target-specific configuration is available for the language switching, then after a modification of the text lists defined in TwinCAT PLC Control a project download must be done.