Globalization

Contents

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

Installation

ionic cordova plugin add cordova-plugin-globalizationnpm install @ionic-native/globalization
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEYnpm install @ionic-enterprise/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));