Update cookies preferences
Promotic

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 specifying the format of output data. Entries are in the 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 a text string (the separator is comma ',').
"what:idtitlearray;" - Returns the list of national language identifiers as 2-dimensional array that is suitable for displaying as a selection menu using the Opening the viewer for option selection (/#glob/list).
Each row represents one national language.
The column represents the identifier and localized language name.
Return value:
The output list is either in the form of a text string or 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(null, "/#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.28: Available for Web panels.
Pm8.02.00: Created
PROMOTIC 9.0.31 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.