Localization allows you to translate text into multiple languages in a project for display on client screens. The localization feature allows users located in different countries to set their default language so client screens can be displayed in their native language. The user can easily choose which language their Client displays with a click of a button! Text contained in components, that have their properties correctly mapped with localization, will change to reflect the language the user has selected. There is a special Language Selector component that requires no set up at all! It's a simple dropdown list that displays the language options for these translations.
Just pick the language you want and all the text on the window will be displayed in the language the user selects. Pretty "cool!"
Change all Text just by Selecting the Language
It's simple to switch the current language in your project. Ignition has several easy ways to change language settings.
One way you can select your preferred language is on the Login screen. There is a dropdown list that automatically appears as soon as you add a second language to your project.
Dropdown Language Selector Component on a Window
You can also switch the language in your project by using the Language Selector Component on your project window. In Preview Mode, select the dropdown language selector component, and choose your desired language.
Using Scripting to Change the Client's Locale
Aside from manually selecting a language, the Client attempts to do this automatically by detecting the locale configured on the host computer. The locale can be specified via scripting with system.util.setLocale. This allows you to utilize scripting events, such as a Client Startup Script to automatically change the client's locale when a user logs in.
Store All Translations in One Central Location
All translations are stored centrally in the Gateway and are distributed to each Client and Designer. All projects share the same translations, and those translations can be used in other locations, such as Gateway scripts, and alarm messages. The full translation database can be viewed and edited in the Translation Manager panel located in the Designer. You can add new terms and phrases to the Transaction Manager. Make your phrases as long or short as you like with single words or whole paragraphs. It allows users to easily import and export translatable components and share them across projects and with other users. It also has the ability to define new languages.
A central term database and support is automatically 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 needed to take advantage of the translation system.
Translation Database and Term Lookup
Terms are referenced in the translation database using direct string comparison. Ignition has special term Keys that are used to identify when to translate text. The base term may be a user-readable string such as "Start", or any special code you want such as "START_COMMAND" or "#start", which would have an alternate translation for English defined as "Start." This way you can quickly Identify which terms will be translated when working in the Designer. To keep things simple, the English key is automatically used if no match is found for the requested language.
Quickly Identify Fields to Translatable Terms
You can quickly and easily identify, and translate all terms by selecting a container and opening the Translatable Terms pane. Here, you can see all terms for each component in the container, and if each term has an associated translation for the requested language.
You can easily preview your translations in the Designer! To change the preferred language for Preview Mode, use the Preview Language menu item under the Project menu in the Designer. When you put the Designer into Preview Mode, everything on your windows will be automatically translated. Using the Language Selector Component or scripting can still temporarily change the current language, and the language will revert back any time Preview Mode is disabled. The Designer will remember your choice, even when the Designer is restarted.