Monaca Docs
  • Monaca
  • Create Your First App
  • Release Notes and Updates
    • Privacy Manifest Requirement for iOS Apps
    • Plugin uses-permission Tag Deduplication Feature
    • iOS Monaca Debugger Discontinuation & Alternative Features
    • Error submitting to iOS App Store (ITMS-90165)
    • Build error in cordova-custom-config
    • Cordova 11 changes
    • Cordova 10 changes
    • Cordova 9 changes
    • New Monaca CLI and Localkit
    • Migration from Cordova to Capacitor
  • Product Guides
    • Monaca Development Overview
    • Monaca Cloud IDE
      • Overview
      • Features in the Monaca Cloud IDE
      • Integrated Terminal
      • Editor Shortcuts
      • Project Dependencies
        • File and Folder Structure
        • JS/CSS Components
        • Cordova Plugins
        • Custom Cordova Plugins
      • Version Control
        • Introduction
        • GitHub Integration
        • Git SSH Integration
      • Monaca CI
        • Overview
        • Deploy Services
        • Deploy to Appetize.io
        • Deploy to DeployGate
        • Deploy to Firebase
      • Build
        • Building for iOS
          • Building an iOS App
          • Build Settings between Monaca and Xcode
        • Building for Android
        • Building for Electron
          • Building on Windows
        • Building for PWA
        • Building for Windows
        • Build Environment Settings
        • Common Build and Application Upload Errors
        • Build History
      • Distribution
        • App Store Distribution
          • App Store Connect Guide
          • iOS App Upload Feature
        • Google Play Distribution
        • Amazon Appstore Distribution
        • Non-market App Distribution
      • Download App Package
      • Tutorial
    • Monaca Localkit
      • Overview
      • Pairing and Debugging
      • Remote Building and Publishing
      • Troubleshooting Guide
      • Tutorial
    • Monaca CLI
      • Overview
      • Monaca CLI Commands
      • Pairing and Debugging
      • Project Dependencies
        • File and Folder Structure
        • JS/JSS Components
        • Cordova Plugins
        • Custom Cordova Plugins
      • Remote Building and Publishing
      • Troubleshooting Guide
      • Tutorial
    • Monaca Debugger
      • Functionalities
      • Installation
        • Monaca Debugger for Android
        • Monaca Debugger for iOS
        • Monaca Debugger for Android Emulator
      • Usage
      • Custom Build Debugger for iOS
      • iOS App Simulator Build
      • Troubleshooting Guide
      • Tutorials
    • Team Dashboard
    • Quick Viewer
    • Migrating from Other Platforms
      • Key Points
      • Cloud IDE preview function settings
      • Migrating from Angular
      • Migrating from Ionic
      • Migrating from React
      • Migrating from Vue
      • Migrating from PhoneGap
        • Key Differences
        • Guide for PhoneGap Build Users
        • Guide for PhoneGap CLI Users
        • Guide for PhoneGap Desktop App Users
      • Migrating from Telerik
  • Build App
    • Build for iOS
      • Creating a Private Key and CSR
      • Creating a Certificate
      • Updating Provisioning Profiles
  • Tutorials
    • Monaca Cloud IDE Tutorial
      • Part 1: Starting a Project
      • Part 2: Running Monaca Debugger with Monaca Cloud IDE
      • Part 3: Building a Monaca App
      • Part 4: Publishing a Monaca App
    • Monaca Localkit Tutorial
      • Part 1: Starting a Project
      • Part 2: Running Monaca Debugger with Monaca Localkit
      • Part 3: Building a Monaca App
      • Part 4: Publishing a Monaca App
    • Monaca CLI Tutorial
      • Part 1: Starting a Project
      • Part 2: Running Monaca Debugger with Monaca CLI
      • Part 3: Building a Monaca App
      • Part 4: Publishing a Monaca App
    • Electron Tutorial
      • How to Use a NPM Package
      • How to Use a Web API
    • Barcode Scanner Plugin
    • Cordova SQLite Storage Plugin
    • Cordova Google Analytics Plugin
    • Cordova Firebase Plugin
    • Cordova In-app Purchase Plugin
    • Cordova AppVersion Plugin
    • Cordova Ionic Keyboard Plugin
    • Cordova Social Sharing Plugin
    • NIFCLOUD mobile backend
    • Phonegap Push Plugin
  • API Reference
    • Monaca API
      • Monaca Cloud & Remote Build API Guide
      • Utilities
    • Core Cordova Plugins
      • Cordova 11.0
        • Battery Status Plugin
        • Camera Plugin
        • Device Plugin
        • Device Motion Plugin
        • Device Orientation Plugin
        • Dialogs Plugin
        • File Plugin
        • Geolocation Plugin
        • InAppBrowser Plugin
        • Media Plugin
        • Media Capture Plugin
        • Network Information Plugin
        • Splashscreen Plugin
        • Vibration Plugin
        • StatusBar Plugin
      • Cordova 10.0
        • Battery Status Plugin
        • Camera Plugin
        • Device Plugin
        • Device Motion Plugin
        • Device Orientation Plugin
        • Dialogs Plugin
        • File Plugin
        • Geolocation Plugin
        • InAppBrowser Plugin
        • Media Plugin
        • Media Capture Plugin
        • Network Information Plugin
        • Splashscreen Plugin
        • Vibration Plugin
        • StatusBar Plugin
        • Whitelist Plugin (Android Only)
      • Cordova 9.0
        • Battery Status Plugin
        • Camera Plugin
        • Contacts Plugin
        • Device Plugin
        • Device Motion Plugin
        • Device Orientation Plugin
        • Dialogs Plugin
        • File Plugin
        • File Transfer Plugin
        • Geolocation Plugin
        • Globalization Plugin
        • InAppBrowser Plugin
        • Media Plugin
        • Media Capture Plugin
        • Network Information Plugin
        • Splashscreen Plugin
        • Vibration Plugin
        • StatusBar Plugin
        • Whitelist Plugin (Android Only)
    • Third-party Cordova Plugins
      • Advanced HTTP Plugin
      • PhoneGap BarcodeScanner Plugin
      • Cordova Custom Config Plugin
      • DatePicker Plugin
      • Share Plugin (Android)
      • WebIntent Plugin (Android)
    • Monaca Power Plugins
      • Monaca HTML5 Resource Encryption
      • Monaca In-App Updater
      • Monaca Secure Storage
      • Barcode Scanner Plugin
      • Android build memory size setting
    • Service Integration
      • Repro
      • AppsFlyer
    • Configuration Files
      • Android
        • Android Configuration
        • config.xml
        • AndroidManifest.xml
      • iOS
        • iOS Configuration
        • config.xml
        • MonacaApp-Info.plist
  • Samples & Tips
    • Sample Apps
      • AdMob
      • Twitter Single Sign-on App
      • Facebook Single Sign-on App
      • Flickr
      • TODO App
      • BirthYear App
      • Break the Bricks
      • Train Catalog App
      • Omikuji Fortune Telling App
      • Clock App
      • Memo Application
      • RSS Reader App
      • Hello World App
    • Tips & Tricks
      • Playing Sound and Music
      • Control the Splash Screen
      • Using Database
  • Features
    • Push Notification
    • SNS Authentication
    • Database
  • FAQ
    • General
    • IDE
    • Build
    • Release
    • Subscription
      • How to Use Activation Code
    • Application
    • Usage
    • Debugger
  • Supported Environments
  • Trouble Shooting
    • Preview Log repeats to reload (Vue packages version mismatch error)
  • Monaca Product Website
  • 日本語
Powered by GitBook
On this page
  • Deprecation Notice
  • Plugin ID
  • Adding the Plugin in Monaca
  • API Reference
  • Objects
  • Methods

Was this helpful?

  1. API Reference
  2. Core Cordova Plugins
  3. Cordova 9.0

Globalization Plugin

PreviousGeolocation PluginNextInAppBrowser Plugin

Last updated 3 years ago

Was this helpful?

Deprecated for Cordova 9.0 or higher. Please refer to for the transition from cordova-plugin-globalization.

Tested Version:

This document is based on the original Cordova docs available at .

This plugin obtains information and performs operations specific to the user's locale, language, and timezone. Note the difference between locale and language: locale controls how numbers, dates, and times are displayed for a region, while language determines what language text appears as, independently of locale settings. Often developers use locale to set both settings, but there is no reason a user couldn't set her language to "English" but locale to "French", so that text is displayed in English but dates, times, etc., are displayed as they are in France. Unfortunately, most mobile platforms currently do not make a distinction between these settings.

This plugin defines global navigator.globalization object. Although in the global scope, it is not available until after the deviceready event.

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    console.log(navigator.globalization);
}

Deprecation Notice

With the now supported on iOS, Android and Windows devices, this plugin is not required any more. Migrating from this plugin to the is explained in this .

Plugin ID

cordova-plugin-globalization

Adding the Plugin in Monaca

In order to use this plugin, please Globalization plugin in Monaca Cloud IDE.

API Reference

Objects

  • GlobalizationError

Methods

  • navigator.globalization.getPreferredLanguage

  • navigator.globalization.getLocaleName

  • navigator.globalization.dateToString

  • navigator.globalization.stringToDate

  • navigator.globalization.getDatePattern

  • navigator.globalization.getDateNames

  • navigator.globalization.isDayLightSavingsTime

  • navigator.globalization.getFirstDayOfWeek

  • navigator.globalization.numberToString

  • navigator.globalization.stringToNumber

  • navigator.globalization.getNumberPattern

  • navigator.globalization.getCurrencyPattern

navigator.globalization.getPreferredLanguage

Get the BCP 47 language tag for the client's current language.

navigator.globalization.getPreferredLanguage(successCallback, errorCallback);

Description

Returns the BCP-47 compliant language identifier tag to the successCallback with a properties object as a parameter. That object should have a value property with a String value.

If there is an error getting the language, then the errorCallback executes with a GlobalizationError object as a parameter. The error's expected code is GlobalizationError.UNKNOWN_ERROR.

Supported Platforms

  • Android

  • iOS

Example

When the browser is set to the en-US language, this should display a popup dialog with the text language: en-US:

navigator.globalization.getPreferredLanguage(
    function (language) {alert('language: ' + language.value + '\n');},
    function () {alert('Error getting language\n');}
);

Android Quirks

  • Returns the ISO 639-1 two-letter language code, upper case ISO 3166-1 country code and variant separated by hyphens. Examples: "en", "en-US", "US"

navigator.globalization.getLocaleName

Returns the BCP 47 compliant tag for the client's current locale setting.

navigator.globalization.getLocaleName(successCallback, errorCallback);

Description

Returns the BCP 47 compliant locale identifier string to the successCallback with a properties object as a parameter. That object should have a value property with a String value. The locale tag will consist of a two-letter lower case language code, two-letter upper case country code, and (unspecified) variant code, separated by a hyphen.

If there is an error getting the locale, then the errorCallback executes with a GlobalizationError object as a parameter. The error's expected code is GlobalizationError.UNKNOWN_ERROR.

Supported Platforms

  • Android

  • iOS

Example

When the browser is set to the en-US locale, this displays a popup dialog with the text locale: en-US.

navigator.globalization.getLocaleName(
    function (locale) {alert('locale: ' + locale.value + '\n');},
    function () {alert('Error getting locale\n');}
);

Android Quirks

  • Java does not distinguish between a set "language" and set "locale," so this method is essentially the same asnavigator.globalization.getPreferredLanguage().

navigator.globalization.dateToString

Returns a date formatted as a string according to the client's locale and timezone.

navigator.globalization.dateToString(date, successCallback, errorCallback, options);

Description

Returns the formatted date String via a value property accessible from the object passed as a parameter to the successCallback.

The inbound date parameter should be of type Date.

If there is an error formatting the date, then the errorCallback executes with a GlobalizationError object as a parameter. The error's expected code is GlobalizationError.FORMATTING_ERROR.

The options parameter is optional, and its default values are:

{   
    formatLength: 'short',
    selector: 'date and time'
}

The options.formatLength can be short, medium, long, or full.

The options.selector can be date, time or date and time.

Supported Platforms

  • Android

  • iOS

Example

If the browser is set to the en_US locale, this displays a popup dialog with text similar to date: 9/25/2012 4:21PM using the default options:

navigator.globalization.dateToString(
    new Date(),
    function (date) { alert('date: ' + date.value + '\n'); },
    function () { alert('Error getting dateString\n'); },
    { formatLength: 'short', selector: 'date and time' }
);

Android Quirks

navigator.globalization.getCurrencyPattern

Returns a pattern string to format and parse currency values according to the client's user preferences and ISO 4217 currency code.

navigator.globalization.getCurrencyPattern(currencyCode, successCallback, errorCallback);

Description

Returns the pattern to the successCallback with a properties object as a parameter. That object should contain the following properties:

  • code: The ISO 4217 currency code for the pattern. (String)

  • fraction: The number of fractional digits to use when parsing and formatting currency. (Number)

  • rounding: The rounding increment to use when parsing and formatting. (Number)

  • decimal: The decimal symbol to use for parsing and formatting. (String)

  • grouping: The grouping symbol to use for parsing and formatting. (String)

The inbound currencyCode parameter should be a String of one of the ISO 4217 currency codes, for example 'USD'.

If there is an error obtaining the pattern, then the errorCallback executes with a GlobalizationError object as a parameter. The error's expected code is GlobalizationError.FORMATTING_ERROR.

Supported Platforms

  • Android

  • iOS

Example

When the browser is set to the en_US locale and the selected currency is United States Dollars, this example displays a popup dialog with text similar to the results that follow:

navigator.globalization.getCurrencyPattern(
    'USD',
    function (pattern) {
        alert('pattern: '  + pattern.pattern  + '\n' +
                'code: '     + pattern.code     + '\n' +
                'fraction: ' + pattern.fraction + '\n' +
                'rounding: ' + pattern.rounding + '\n' +
                'decimal: '  + pattern.decimal  + '\n' +
                'grouping: ' + pattern.grouping);
    },
    function () { alert('Error getting pattern\n'); }
);

Expected result:

pattern: $#,##0.##;($#,##0.##)
code: USD
fraction: 2
rounding: 0
decimal: .
grouping: ,

navigator.globalization.getDateNames

Returns an array of the names of the months or days of the week, depending on the client's user preferences and calendar.

navigator.globalization.getDateNames(successCallback, errorCallback, options);

Description

Returns the array of names to the successCallback with a properties object as a parameter. That object contains a value property with an Array of String values. The array features names starting from either the first month in the year or the first day of the week, depending on the option selected.

If there is an error obtaining the names, then the errorCallback executes with a GlobalizationError object as a parameter. The error's expected code is GlobalizationError.UNKNOWN_ERROR.

The options parameter is optional, and its default values are:

{   
    type: 'wide', 
    item: 'months'
}

The value of options.type can be narrow or wide.

The value of options.item can be months or days.

Supported Platforms

  • Android

  • iOS

Example

When the browser is set to the en_US locale, this example displays a series of twelve popup dialogs, one per month, with text similar to month: January:

navigator.globalization.getDateNames(
    function (names) {
        for (var i = 0; i < names.value.length; i++) {
            alert('month: ' + names.value[i] + '\n');
        }
    },
    function () { alert('Error getting names\n'); },
    { type: 'wide', item: 'months' }
);

navigator.globalization.getDatePattern

Returns a pattern string to format and parse dates according to the client's user preferences.

navigator.globalization.getDatePattern(successCallback, errorCallback, options);

Description

Returns the pattern to the successCallback. The object passed in as a parameter contains the following properties:

  • timezone: The abbreviated name of the time zone on the client. (String)

  • iana_timezone: The IANA name of the time zone on the client. (String)

  • utc_offset: The current difference in seconds between the client's time zone and coordinated universal time. (Number)

  • dst_offset: The current daylight saving time offset in seconds between the client's non-daylight saving's time zone and the client's daylight saving's time zone. (Number)

If there is an error obtaining the pattern, the errorCallback executes with a GlobalizationError object as a parameter. The error's expected code is GlobalizationError.PATTERN_ERROR.

The options parameter is optional, and defaults to the following values:

{ 
    formatLength: 'short', 
    selector: 'date and time'
}

The options.formatLength can be short, medium, long, or full. The options.selector can be date, time or date and time.

Supported Platforms

  • Android

  • iOS

Example

When the browser is set to the en_US locale, this example displays a popup dialog with text such as pattern: M/d/yyyy h:mm a:

function checkDatePattern() {
    navigator.globalization.getDatePattern(
        function (date) { alert('pattern: ' + date.pattern + '\n'); },
        function () { alert('Error getting pattern\n'); },
        { formatLength: 'short', selector: 'date and time' }
    );
}

navigator.globalization.getFirstDayOfWeek

Returns the first day of the week according to the client's user preferences and calendar.

navigator.globalization.getFirstDayOfWeek(successCallback, errorCallback);

Description

The days of the week are numbered starting from 1, where 1 is assumed to be Sunday. Returns the day to the successCallback with a properties object as a parameter. That object should have a value property with a Number value.

If there is an error obtaining the pattern, then the errorCallback executes with a GlobalizationError object as a parameter. The error's expected code is GlobalizationError.UNKNOWN_ERROR.

Supported Platforms

  • Android

  • iOS

Example

When the browser is set to the en_US locale, this displays a popup dialog with text similar to day: 1.

navigator.globalization.getFirstDayOfWeek(
    function (day) {alert('day: ' + day.value + '\n');},
    function () {alert('Error getting day\n');}
);

navigator.globalization.getNumberPattern

Returns a pattern string to format and parse numbers according to the client's user preferences.

navigator.globalization.getNumberPattern(successCallback, errorCallback, options);

Description

Returns the pattern to the successCallback with a properties object as a parameter. That object contains the following properties:

  • symbol: The symbol to use when formatting and parsing, such as a percent or currency symbol. (String)

  • fraction: The number of fractional digits to use when parsing and formatting numbers. (Number)

  • rounding: The rounding increment to use when parsing and formatting. (Number)

  • positive: The symbol to use for positive numbers when parsing and formatting. (String)

  • negative: The symbol to use for negative numbers when parsing and formatting. (String)

  • decimal: The decimal symbol to use for parsing and formatting. (String)

  • grouping: The grouping symbol to use for parsing and formatting. (String)

If there is an error obtaining the pattern, then the errorCallback executes with a GlobalizationError object as a parameter. The error's expected code is GlobalizationError.PATTERN_ERROR.

The options parameter is optional, and default values are:

{ type: 'decimal' }

The options.type can be decimal, percent, or currency.

Supported Platforms

  • Android

  • iOS

Example

When the browser is set to the en_US locale, this should display a popup dialog with text similar to the results that follow:

navigator.globalization.getNumberPattern(
    function (pattern) {alert('pattern: '  + pattern.pattern  + '\n' +
                                'symbol: '   + pattern.symbol   + '\n' +
                                'fraction: ' + pattern.fraction + '\n' +
                                'rounding: ' + pattern.rounding + '\n' +
                                'positive: ' + pattern.positive + '\n' +
                                'negative: ' + pattern.negative + '\n' +
                                'decimal: '  + pattern.decimal  + '\n' +
                                'grouping: ' + pattern.grouping);},
    function () {alert('Error getting pattern\n');},
    {type:'decimal'}
);

Results:

pattern: #,##0.###
symbol: .
fraction: 0
rounding: 0
positive:
negative: -
decimal: .
grouping: ,

navigator.globalization.isDayLightSavingsTime

Indicates whether daylight savings time is in effect for a given date using the client's time zone and calendar.

navigator.globalization.isDayLightSavingsTime(date, successCallback, errorCallback);

Description

Indicates whether or not daylight savings time is in effect to the successCallback with a properties object as a parameter. That object should have a dst property with a Boolean value. A true value indicates that daylight savings time is in effect for the given date, and false indicates that it is not.

The inbound parameter date should be of type Date.

If there is an error reading the date, then the errorCallback executes. The error's expected code is GlobalizationError.UNKNOWN_ERROR.

Supported Platforms

  • Android

  • iOS

Example

During the summer, and if the browser is set to a DST-enabled timezone, this should display a popup dialog with text similar to dst: true:

navigator.globalization.isDayLightSavingsTime(
    new Date(),
    function (date) {alert('dst: ' + date.dst + '\n');},
    function () {alert('Error getting names\n');}
);

navigator.globalization.numberToString

Returns a number formatted as a string according to the client's user preferences.

navigator.globalization.numberToString(number, successCallback, errorCallback, options);

Description

Returns the formatted number string to the successCallback with a properties object as a parameter. That object should have a value property with a String value.

If there is an error formatting the number, then the errorCallback executes with a GlobalizationError object as a parameter. The error's expected code is GlobalizationError.FORMATTING_ERROR.

The options parameter is optional, and its default values are:

{type:'decimal'}

The options.type can be decimal, percent, or currency.

Supported Platforms

  • Android

  • iOS

Example

When the browser is set to the en_US locale, this displays a popup dialog with text similar to number: 3.142:

navigator.globalization.numberToString(
    3.1415926,
    function (number) {alert('number: ' + number.value + '\n');},
    function () {alert('Error getting number\n');},
    {type:'decimal'}
);

navigator.globalization.stringToDate

Parses a date formatted as a string, according to the client's user preferences and calendar using the time zone of the client, and returns the corresponding date object.

navigator.globalization.stringToDate(dateString, successCallback, errorCallback, options);

Description

Returns the date to the success callback with a properties object as a parameter. That object should have the following properties:

  • year: The four digit year. (Number)

  • month: The month from (0-11). (Number)

  • day: The day from (1-31). (Number)

  • hour: The hour from (0-23). (Number)

  • minute: The minute from (0-59). (Number)

  • second: The second from (0-59). (Number)

  • millisecond: The milliseconds (from 0-999), not available on all platforms. (Number)

The inbound dateString parameter should be of type String.

The options parameter is optional, and defaults to the following values:

{
    formatLength: 'short', 
    selector: 'date and time'
}

The options.formatLength can be short, medium, long, or full. The options.selector can be date, time or date and time.

If there is an error parsing the date string, then the errorCallback executes with a GlobalizationError object as a parameter. The error's expected code is GlobalizationError.PARSING_ERROR.

Supported Platforms

  • Android

  • iOS

Example

When the browser is set to the en_US locale, this displays a popup dialog with text similar to month:8 day:25 year:2012. Note that the month integer is one less than the string, as the month integer represents an array index.

navigator.globalization.stringToDate(
    '9/25/2012',
    function (date) {alert('month:' + date.month +
                            ' day:'  + date.day   +
                            ' year:' + date.year  + '\n');},
    function () {alert('Error getting date\n');},
    {selector: 'date'}
);

navigator.globalization.stringToNumber

Parses a number formatted as a string according to the client's user preferences and returns the corresponding number.

navigator.globalization.stringToNumber(string, successCallback, errorCallback, options);

Description

Returns the number to the successCallback with a properties object as a parameter. That object should have a value property with a Number value.

If there is an error parsing the number string, then the errorCallback executes with a GlobalizationError object as a parameter. The error's expected code is GlobalizationError.PARSING_ERROR.

The options parameter is optional, and defaults to the following values:

{type:'decimal'}

The options.type can be decimal, percent, or currency.

Supported Platforms

  • Android

  • iOS

Example

When the browser is set to the en_US locale, this should display a popup dialog with text similar to number: 1234.56:

navigator.globalization.stringToNumber(
    '1234.56',
    function (number) {alert('number: ' + number.value + '\n');},
    function () {alert('Error getting number\n');},
    {type:'decimal'}
);

GlobalizationError

An object representing an error from the Globalization API.

Properties

  • code: One of the following codes representing the error type (Number)

  • GlobalizationError.UNKNOWN_ERROR: 0

  • GlobalizationError.FORMATTING_ERROR: 1

  • GlobalizationError.PARSING_ERROR: 2

  • GlobalizationError.PATTERN_ERROR: 3

  • message: A text message that includes the error's explanation and/or details. (String)

Description

This object is created and populated by Cordova, and returned to a callback in the case of an error.

Supported Platforms

  • Android

  • iOS

Example

When the following error callback executes, it displays a popup dialog with the text similar to code: 3 and message:

function errorCallback(error) {
    alert('code: ' + error.code + '\n' +
            'message: ' + error.message + '\n');
};

See Also:

formatLength options are a subset of Unicode . The default option short depends on a user selected date format within Settings -> System -> Date & time -> Choose date format, which provide a year pattern only with 4 digits, not 2 digits. This means that it is not completely aligned with .

pattern: The currency pattern to format and parse currency values. The patterns follow . (String)

pattern: The date and time pattern to format and parse dates. The patterns follow . (String)

pattern: The number pattern to format and parse numbers. The patterns follow . (String)

UTS #35
ICU
Unicode Technical Standard #35
Unicode Technical Standard #35
Unicode Technical Standard #35
Third-party Cordova Plugins
Core Cordova Plugins
here
1.0.9
Cordova Docs
ECMA Internationalization API
ECMA Internationalization API
Cordova blog post
enable