mobicontrol.intl

This namespace provides access to the internationalization functionality, like getting or setting the device locale.
Since:
  • Version 1.1 (API level 2)

Classes

Locale

SetLocaleError

Members

static, readonly locale :mobicontrol.intl.Locale

Device display locale.
Since:
  • Version 1.1 (API level 2)
Example
var locale = mobicontrol.intl.locale;
if (locale.language === 'en') {
    mobicontrol.log.info('Welcome!');
} else if (locale.language === 'de') {
    mobicontrol.log.info('Willkommen!');
} else if (locale.language === 'fr') {
    mobicontrol.log.info('Bienvenue!');
}

static, readonly SetLocaleStatusCode :object

This enumeration represents an error status code of mobicontrol.intl.SetLocaleError.
Properties:
Name Type Description
UNKNOWN object The exact error could not be determined.
NOT_SUPPORTED object Setting a locale is not supported.
NOT_AVAILABLE object Specified locale is not installed.
Since:
  • Version 1.1 (API level 2)

Methods

static setLocale(locale)

Set device's display locale.

This function is supported only for the Android Classic Platform signed agents.

Parameters:
Name Type Description
locale mobicontrol.intl.Locale The new display locale.
Throws:
Since:
  • Version 1.1 (API level 2)
Example
var locale = new mobicontrol.intl.Locale("en", "CA");
try {
    mobicontrol.intl.setLocale(locale);
    mobicontrol.log.info('Locale set.');
} catch (err) {
    mobicontrol.log.error('Set locale failed with status code ' + err.statusCode);
}