Switch languages for custom properties at runtime
- Last UpdatedJul 22, 2024
- 1 minute read
Embedded Industrial Graphics and Industrial Graphics embedded in the InTouch HMI can contain translated custom properties.
When you switch to a language for the first time, the translated overrides of the custom properties are loaded from the dictionary file of the Industrial Graphic's overrides.
After switching to a new language in the InTouch WindowViewer, the translated custom properties are updated based on the switched language. All the animations/scripts that subscribe to a custom property are notified of the value change and the animation/script values are updated accordingly.
For example:
-
Graphic S1 has a constant string custom property CP1.
-
S1 has two languages configured: English and French. English is the default language. The English is "English CP1."
-
CP1 has the French translation, "French CP1." S1 has two graphic elements: Textbox and Button.
-
Each graphic has a value display animation that subscribes to CP1.
-
An InTouch Window has two embedded graphics of S1.
-
The second instance of S1 has the translated CP1 override in French ("French Override CP1") and German ("German Override CP1").
The following steps describe how the translated custom properties are shown.
-
Set the language to French in WindowViewer.
The value display animation of Textbox and Button in the first instance of S1 shows "French CP1."
The value display animation of Textbox and Button in the second instance of S1 shows "French Override CP1."
-
Set the language to German in the WindowViewer.
The value display animation of Textbox and Button in the first instance of S1 shows "English CP1."
The value display animation of Textbox and Button in the second instance of S1 shows "German Override CP1."