Before diving into the details, you may want to review these fundamentals first:
Suppose you want to send an error message from your PLC to the HMI. You likely wouldn't want to store the translation on your PLC, along with all other language translations.
Instead, you would prefer to send a unique key for this particular translation. The HMI would automatically translate this key into the language currently selected by the user.
That's precisely the purpose of the
TranslationsKey
data type. It can be used to let HELIO know that a particular String variable should be translated automatically.
In the following example, the PLC provides a string variable. However, its data type is set to TranslationKey
in the HMI project. This variable currently holds the value "ErrorMessage.500.Title"
.
The HELIO Runtime checks the variable type, looks up the key in its translations, and renders the translated text in the HMI. In this case, the text is “Not Allowed To Execute This Action”
.
String
) into your project using the Data View.String
to TranslationKey
and link it to the property of an Element inside the Content View. For instance, the title of a Message
element."ErrorMessage.500.Title"
. Typically, these keys are defined in collaboration with engineers from the PLC team."ErrorMessage.500.Title"
, along with appropriate translations for each language.