Promotic
WikipediaLinkedInYoutubeTwitterFacebook

GetRtLangs - method of the Pm object

Description:
Returns the list of all national languages supported in the application. See PmaRoot > Application > All used languages.

The list is especially useful for Opening the viewer for option selection (/#glob/list). It allows to easily create the selection menu allowing the users to swith languages in the application runtime.

Syntax:
Variant GetRtLangs(String sParams)
Parameters:
sParams(String) Additional parameters for defining the format of output data. Entries are in KeyVal format.
"what:xx;" (mandatory) - Specifies the format of output data. For example "what:idlist;".
"what:idlist;" - Returns the list of identified national languages in the form of string (the separator is comma ',').
"what:idtitlearray;" - Returns the list of national language identifiers in the form of 2-dimensional array that is suitable for displaying as a selection menu by using the Opening the viewer for option selection (/#glob/list). Each row represents one national language. The column represents the identifier and localized language names.
Return values:
The output list is in the form of string or in the form of 2-dimensional array.
Note:
This method is also functional in Web panels.
Example:
Displays the selection menu of all national languages.

In the sLang variable, there will be:

- string containing the identifier of selected national language (e.g. "en", "de" ..., see How to create an application using different national languages)
- or an empty string if no selection was completed (if Cancel).
JavaScriptSelect and copy to clipboard

function onViewClose(ev)
{
if (ev.CloseReason == "ok")
{
var sLang = ev.ReturnValue;
if (Pm.IsValid(sLang))
Pm.RtLang = sLang;
}
}

var aLangs = Pm.GetRtLangs("what:idtitlearray;");
var oCreator = Pm.CreateView(pMe.PmPanel, "/#glob/list", "autoselect:0;grid:1;title:Selection;", "target:_blank;modal:1;pos:view," + pMe.ViewX + "," + pMe.ViewY + ";");
oCreator.View.list = aLangs;
oCreator.View.onClose = onViewClose;
oCreator.Open();

History:
Pm9.00.02: Available for Web panels.
Pm8.02.00: Created
PROMOTIC 9.0.15 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- GetRtLangs
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice