Multilingual support in EmWi
Description:
One of the most beneficial features of EmWi is the multilingual UI support. Therefore this article summarizes important things and features to facilitate the development of multilingual UIs.
Solution:
First of all we strongly recommend to use our template Excel sheet "Strings.xls" for string import from the beginning of your projects. This template is available from our download center as an example together with the HowTo document [HT-007-Excel_String_Table_Import.pdf]. With this Excel sheet you can generate the string constants for all available languages in your project. It can be edited from any staff or external translation offices without an EmWi license and even without any EmWi skills. When you get back the document, you just press the generate-button to generate the EmWi string constants and import it to your project.
Using our Excel sheet template offers additionally the possibility to analyze the content for the used character codes. The output is a font range definition in Chora code that can be used in your project to limit the font resources and reduce the code size by this.
With so called "Language bricks" from the Templates gallery you can drag and drop variant identifiers for the supported languages in your EmWi project. These languages can be assigned to the global variable "language" in the Chora code. Then EmWi will automatically take care, that the corresponding language variant of a string constant will be used in the display.
Even if the most common language dependency is for strings in different languages, EmWi offers language variant values also for resources (images and fonts) and all other types of constants (color, int32, point, etc.).
Note:
If a menu should change its appearance immediately when the language get changed, you need to set the attribute "MultiLingual" of the involved menu class(es) to "true". Since this causes EmWi to generate additional code for an immediate re-initialization, you should set the "MultiLingual" attribute only in menu classes that are visible during the language change.
See also:
HowTo document [HT-007-Excel_String_Table_Import.pdf]
Keywords:
Generate, strings, multilingual, translation, language
Last update on 2010-08-19 by Mario Stefanutti.