getMultiLanguage();
The getMultiLanguage method determines whether multilingual options are enabled for a dashboard.
Available values:
True. Multilingual options are enabled, dashboard text fields can be translated to different languages.
False. Multilingual options are disabled.
To execute the example, make sure that the repository contains a dashboard with the 88665 key.
Create an HTML page with example of placing the KapBox component and execute the following operations:
Open the dashboard with the 88665 key:
Select the Document > Open main menu item
Execute the following in the console:
kapBox.open({
Key: 88665
});
Execute the following in the console:
var multilinguaCheckBox = new PP.Ui.CheckBox({
ParentNode: "checkBox",
Content: "Multilingual options",
Checked: true,
CheckedChanged: function () {
kapBox.setMultiLanguage(multilinguaCheckBox.getChecked());
if (kapBox.getMultiLanguage() == true) {
console.log("Translation to different languages is enabled");
}
}
});
After executing the example, the Multilingual Options checkbox is added, which, if selected or deselected, enables or disables multilingual options. If multilingual options are enabled, the console displays appropriate message.
See also: