Globalization

Contents

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?

Installation

Community Enterprise
ionic cordova plugin add cordova-plugin-globalization npm install @ionic-native/globalization
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More   or   Contact Us
ionic activate-native-ee --key=YOURPRODUCTKEY ionic integrations add @ionic-native/globalization

Supported Platforms

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

Usage

import { Globalization } from '@ionic-native/globalization/ngx';

constructor(private globalization: Globalization) { }


...


this.globalization.getPreferredLanguage()
  .then(res => console.log(res))
  .catch(e => console.log(e));