RtLang - property of the Pm object
The language version of the runtime application.
Property access for read and write
. The preset value of this property is defined in the "Main language of runtime
" configurator of the PmaRoot
This property is also functional in Web panels.
The value of this property influences selecting the text by Macro expression $.text
If the language version is changed in the runtime mode by writing into this property, then the change should be made in the PmaRoot.onAppStartBegin
If it is written into the property later while starting or running the application, then some parts of PROMOTIC needn't reflect the change of the language. For example the panel that is already open will not refresh the displayed texts - it is necessary to reopen it.
In such case it is recommended to call the Pm.RestartGui method after setting the property. See Example3.
The font palette is automatically created again after the language is changed so the panel uses the new font when it is opened the next time.
Detects the currently active language
Pm.Debug("Language=" + Pm.RtLang);
The command in the PmaRoot.onAppStartBegin
event sets the language on application launch based on the value defined in the config.ini
file (section [runtime]
, key rtlanguage
Pm.RtLang = Pm.IniFileRead("#cfg:config.ini", "runtime", "rtlanguage", "en");
Changes the application language and reopens all windows so the language change is visible
Pm.RtLang = "en";