Internationalization of sources
TwinCAT 3.1 Build 4026 required The functionality described here requires version TwinCAT 3.1 4026.0. |
The SourceInfo of an event should describe the location to which an event belongs. The SourceName can be used to describe a source for a person. This means that the SourceName should also be translated in some cases.
Follow the steps below to internationalize the SourceName:
- 1. Create an event class that is used to carry the translation information. The name is arbitrary, for example "TranslationEventClass".
- 2. Create an event in the event class for each SourceName to be translated and write the SourceName to be translated as display text in this event.
- 3. Create a translation table for these events with the different languages.
- 4. To access the translations, you must set the created event class as SourceGuid at the respective event. This provides the reference so that the texts can be transferred to the target system and used for translation.
- 5. Activate the Solution.
- The translations are available on the target system.
The translations can be accessed in different ways:
- TwinCAT/HMI: Provides the translated SourceName in the Grid Control event.
- The LoggedEvents window from Engineering automatically displays the translation when a language is selected.
- PLC: The translation for a SourceName can be queried via the function block FB_RequestTranslation.