Globalization
The globalization plugin can be used in order to get the user locale and language and to perform operations specific to the user's locale and time zone.
In order to use the globalization plugin in our Apache Cordova project, we need to use the following cordova plugin add
command:
> cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-globalization.git
Demo
In order to access the globalization demo, you can click on the Globalization list item. You will be introduced to the Globalization page. You can click on the Get Locale Name button in order to get the user's locale name or the Get Preferred Language button in order to get the user's preferred language, as shown in the following screenshot:
Get JavaScript Mobile Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.