Skip to main content

Globalization

This plugin obtains information and performs operations specific to the user's locale, language, and timezone.

https://github.com/apache/cordova-plugin-globalization

Stuck on a Cordova issue?

Don't waste precious time on plugin issues.

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Installation#

$ npm install cordova-plugin-globalization
$ npm install @ionic-native/globalization
$ ionic cap sync

Supported Platforms#

  • Amazon Fire OS
  • Android
  • Browser
  • iOS
  • Windows

Usage#

React#

Learn more about using Ionic Native components in React

Angular#

import { Globalization } from '@ionic-native/globalization/ngx';
constructor(private globalization: Globalization) { }
...
this.globalization.getPreferredLanguage()
.then(res => console.log(res))
.catch(e => console.log(e));