• Documentation
  • Plugins
  • Blog
  • Contribute
  • Team
  • Get Started
  • Accelerometer
  • Camera
  • Capture
  • Compass
  • Connection
  • Contacts
  • Device
  • Events
  • File
  • Geolocation
  • Globalization
  • Media
  • Notification
  • Splashscreen
  • Storage
  • Getting Started Guides
  • Command-Line Usage
  • Upgrading Guides
  • Project Settings
  • Plugin Development Guide
  • Domain Whitelist Guide
  • Embedding WebView
  • Accelerometer
  • Camera
  • Capture
  • Compass
  • Connection
  • Contacts
  • Device
  • Events
  • File
  • Geolocation
  • Globalization
  • Media
  • Notification
  • Splashscreen
  • Storage
  • Getting Started Guides
  • Command-Line Usage
  • Upgrading Guides
  • Project Settings
  • Plugin Development Guide
  • Domain Whitelist Guide
  • Embedding WebView
  • dev
  • 12.x-2025.01 (Latest)
  • 12.x
  • 11.x
  • 10.x
  • 9.x
  • 8.x
  • 7.x
  • 6.x
  • 5.4.0
  • 5.1.1
  • 5.0.0
  • 4.0.0
  • 3.6.0
  • 3.5.0
  • 3.4.0
  • 3.3.0
  • 3.2.0
  • 3.1.0
  • 3.0.0
  • 2.9.0
  • 2.8.0
  • 2.7.0
  • 2.6.0
  • 2.5.0
  • 2.4.0
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.9.0
  • 1.8.1
  • 1.8.0
  • 1.7.0
  • 1.6.1
  • 1.6.0
  • 1.5.0
This version of the documentation is outdated! Click here for the latest released version.

Globalization

The globalization object obtains information and performs operations specific to the user's locale and timezone.

Objects

  • GlobalizationError

Methods

  • globalization.getPreferredLanguage
  • globalization.getLocaleName
  • globalization.dateToString
  • globalization.stringToDate
  • globalization.getDatePattern
  • globalization.getDateNames
  • globalization.isDayLightSavingsTime
  • globalization.getFirstDayOfWeek
  • globalization.numberToString
  • globalization.stringToNumber
  • globalization.getNumberPattern
  • globalization.getCurrencyPattern

Variable Scope

The globalization object is a child of the navigator object, and therefore has global scope.

// The global globalization object
var globalization = navigator.globalization;

Permissions

Android

app/res/xml/config.xml

<plugin name="Globalization" value="org.apache.cordova.Globalization" />

More Resources

General

  • Apache Project Page
  • Source Distribution
  • License
  • Artwork

Development

  • Source Code
  • Issue Tracker
  • Stack Overflow
  • Mailing List
  • Nightly builds

Apache Software Foundation

  • About ASF
  • Events
  • Become a Sponsor
  • Thanks
  • Security
  • Privacy policy

Contribute

Help Cordova move forward!

Report bugs, improve the docs, or contribute to the code.

Learn More

Follow @apachecordova

Copyright © 2025 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.
Apache and the Apache feather logos are trademarks of The Apache Software Foundation.

See the attributions page for other copyright & trademark notices.