Top  | Previous | Next

Introduction

The Ignition translation system allows you to define text in multiple languages that will selected dynamically based on user preference. The system is built around a central term database, and support is built into all component text properties, as well as other text based properties, such as alarm messages. Aside from defining translations for terms, there is usually no other work that needs to be done to take advantage of the translation system.

 

The Translation Database and Term Lookup

All translations are stored centrally in the gateway, and are distributed to each client and designer. In other words, all projects share the same translations, and those translations can be used in other locations, such as gateway scripts, and alarm messages.

 

When translation is required, terms are referenced in the translation database using direct string comparison, with some limited options for changing how terms match (for example, case and punctuation sensitivity). The term keys belong to the "base language", which by default is English, and will be returned if no match is found for the requested language. Since it is possible to define an alternate "translation" for the base language, the base term may be either a user-readable string, such as "Start", or a special code, such as "START_COMMAND", which would have an "alternate translation" defined for "Start".

 

The full translation database can be viewed and edited in the Translation Manager. That tool also allows translation import and export, and the ability to define new languages. You may also define new languages from the component translation tool, described in the next section.

 

Container Level Translations

In addition to the global term database, it is possible to specify translations locally on Windows and Templates. This allows for easy portability of translated components, such as a template that is already translated into multiple languages and made available through Cloud Templates. On lookup, the local definition table is consulted first, and then the global database is searched if a match is not found.

Using Translations

As mentioned above, in most cases no special work is required to use the translations defined in the system. When the user language is modified, through the various means described in Changing the Current Language, all components are automatically updated. Additionally, it is possible to look up translations using the translate() expression function, and the system.util.translate() and system.util.modifyTranslation() scripting functions.

 

Translations are matched by looking for the base language value in the translation database. There are several options that can affect how lookup occurs, which are set in the translation manager. For example, it is possible to ignore capitalization and punctuation in the lookup, so a component whose text was "Start:", would match a translated term for "start".