setSettings(settings: Object);
settings. Application settings. Value of this parameter is a JSON object with the following properties: Config - system configuration, Locale - language and regional settings.
The setSettings method determines application settings.
Executing the example requires an opened Prognoz Platform 9 web application. The scenario specified below must be started in the browser console.
Determine custom system parameter, set English language for the interface:
// Load system configuration
var result = PP.App.loadConfig();
if (result) {
// Determine system configuration
var config = PP.AppConfig;
// Determine inherent parameter
config.MyParam = true;
config.Modules = null;
// Determine new settings of application
var settings = {
Config: config,
Locale: PP.CultureNames.en // Determine language and regional settings
};
// Determine new settings of application
PP.App.setSettings(settings);
// Output inherent parameter value
console.log("Value of the MyParam parameter: " + PP.AppConfig.MyParam);
};
After executing the example English language is set for system interface, and value of custom parameter is displayed in the browser console:
MyParam value: true
See also: