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?
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
- Capacitor
- Cordova
- Enterprise
$ npm install cordova-plugin-globalization
$ npm install @awesome-cordova-plugins/globalization
$ ionic cap sync
$ ionic cordova plugin add cordova-plugin-globalization
$ npm install @awesome-cordova-plugins/globalization
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Β Learn More or if you're interested in an enterprise version of this plugin Contact Us
Supported Platforms
- Amazon Fire OS
- Android
- Browser
- iOS
- Windows
Usage
React
Learn more about using Ionic Native components in React
Angular
import { Globalization } from '@awesome-cordova-plugins/globalization/ngx';
constructor(private globalization: Globalization) { }
...
this.globalization.getPreferredLanguage()
.then(res => console.log(res))
.catch(e => console.log(e));