How to create an application using different national languages

Switching OS Windows into the respective language setting

If an application has to be operated in a foreign language, then the support for this language has to be installed in OS Windows. It goes about the language fonts and also about setting the keyboard layout for the language. The support of individual national languages is set for greater groups in OS Windows, for example:
a) Central Europe with the code page 1250 (Czech, Slovak, Poland, Hungary, etc.)
b) Cyrillic with the code page 1251 (Russia)

In OS Windows 2000 and higher it is possible to set the support even for more language groups concurrently. Though it is possible to display texts in various languages in the application concurrently (even from different code pages), based on the installed language groups.

We set the languages itself in Regional Options in Control panel of OS Windows. We set the support for the language groups, the default language, the language for time, currency, etc. format. Further we can set the keyboard layout (even several layouts concurrently and the key sequence for switching between them).

Setting the PROMOTIC system and the application into the respective language

Now we create a new application or open an existing application in the PROMOTIC system and in the development environment of the PROMOTIC system we set the language of the development environment. This language has no impact on the language of the resultant application. The setting is in the Development system language configurator in the "Options > PROMOTIC settings" menu of the application editor.

In the application itself we set the language version of the application. We perform the setting itself in the PmRoot > Application > Main language of runtime configurator. This setting defines the language of system texts in PROMOTIC windows, components, viewers etc. The language setting of the application is accessible by using the Pm.RtLang property.

Next directions

It is possible to create an application that can be switched between more national languages when running. This functionality can be achieved so that in all situations when the national text has to be entered (e.g. the Text configurator of the PmiText graphic item), Macro expression $.text is written instead of the real text. If the macro expression cannot be used (e.g. text is created dynamically in the algorithm), then the Pm.EvalMacro method can be used.
The PmWebLang object can be used for creating application, offering HTML pages as Web server and these pages wil be available in multiple language versions. For example the local PROMOTIC application will be running in English, but the Web pages will be offered independently in English/German/Russian ... language version.
The example of switching the languages i runtime and offering the Web pages in another languages can be found in the following example: Demo application of PROMOTIC system.

Fully supported languages in the PROMOTIC system

A list of languages with full support and all system texts in PROMOTIC runtime mode. These texts are contained in the text_sys.xml file that is located in the PROMOTIC installation folder and in the text_rt0.xml file that can be found in the Syst folder. Selection of these languages in running application is done by the All used languages configurator and the main language by the PmRoot > Application > Main language of runtime configurator. In Macro expression $.text, there is a description and syntax of user texts in application. The example of language switching can be found in Example of language runtime.
id name countries
cs Czech CZ=Czech republic
de German DE=Federal Republic of Germany, AT=Republic of Austria, CH=Swiss Confederation ...
el Greek GR=Hellenic Republic
en English US=USA, UK=United Kingdom, IE=Ireland, CA=Canada ...
es Spanish ES=Kingdom of Spain
fa Persian (Farsi) IR=Islamic Republic of Iran
fr French FR=French Republic, CH=Swiss Confederation, CA=Canada ...
hu Hungarian HU=Republic of Hungary
lt Lithuanian LT=Republic of Lithuania
ms Bahasa Malaysia MY=Malaysia
pl Polish PL=Republic of Poland
ru Russian RU=Russian Federation
sk Slovak SK=Slovakia
sr-latn Serbian language written in Latin RS=Republic of Serbia
tr Turkish TR=Republic of Turkey
uk Ukrainian UA=Ukraine
vi vietnamese VN=Vietnam
zh Standard Mandarin CN=People's Republic of China

Languages without system texts in runtime mode

FOr these languages, the system texts in runtime mode will be displayed in development mode language or in English. In the configurator All used languages, it is necessary to enter the identifier (id) of the corresponding language(s). In the configurator PmRoot > Application > Main language of runtime, also enter the default runtime language. In Macro expression $.text, there is a description and syntax of user texts in application. The example of language switching can be found in Example of language runtime.
id name countries
af afrikaans ZA=Republic of South Africa
ar Arabic SA=Kingdom of Saudi Arabia
bg Bulgarian BG=Republic of Bulgaria
bs Bosnian, Croatian, Serbian BA=Bosnia and Herzegovina
by Belarusian, Russian BY=Republic of Belarus
da Danish DK=Kingdom of Denmark
et Estonian EE=Republic of Estonia
fi Finnish FI=Republic of Finland
he Hebrew IL=State of Israel
hr Croatian HR=Republic of Croatia
hy Armenian AM=Republic of Armenia
id Indonesian ID=Republic of Indonesia
is Icelandic IS=Iceland
it Italian IT=Italian Republic
ja Japanese JP=Japan
ka Georgian GE=Georgia
kk Kazakh KZ=Republic of Kazakhstan
ko Korean KR=Republic of Korea
ky Kyrgyz KG=Kyrgyz Republic
lv Latvian LV=Republic of Latvia
mk Macedonian MK=Republic of Macedonia
mn Mongolian MN=Mongolia
mt Maltese MT=Republic of Malta
nl Dutch NL=Netherlands
no Norwegian NO=Kingdom of Norway
pt Portuguese PT=Portuguese Republic
ro Romanian RO=Romania
sl Slovenian SI=Republic of Slovenia
sq Albanian AL=Albania
sr-cyrl Serbian language written in Cyrilic RS=Republic of Serbia
sv Swedish SE=Kingdom of Sweden
tg Tajik TJ=Republic of Tajikistan
th thai TH=Kingdom of Thailand
tk Turkmen TM=Turkmenistan
ur Urdu PK=Islamic Republic of Pakistan
uz Uzbek UZ=Republic of Uzbekistan
PROMOTIC 8.3.21 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- How to create an application using different national languages
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice