Change the language
Language switching in TwinCAT HMI is implemented with keys, which are managed in language tables (localization files). Any texts in different languages can be stored in the language table for a key.
In the Designer, the keys are linked directly to the respective control properties. The texts behind the respective keys are resolved in the Designer directly in the currently active language.
Set active language
The active language can be set in engineering as follows:
- Project properties: The default language for the project can be set in the project properties.
- User Configuration: The language per user can be set in the user configuration. This setting overrides the default language set in the project properties.
Manage language tables
The language tables (localization files) of a TwinCAT HMI project are managed in the Localization editor. Language tables can be added to the project as a new TwinCAT HMI item.
Switch language in client
The active language can be switched at runtime in the client, regardless of which language settings have been specified in the project properties and for the logged in user. The switchover at runtime is realized with the function "SetLocale", which can be used in the Actions & Conditions editor.