I am looking for an equivalent to NSLocaleUsesMetricSystem (xCode / Swift), but for Cordova / PhoneGap / Intel XDK. Is Cordova able to interrogate the platform the App is running on in order to determine if a device is displaying data by default in imperial or metric? (That's basically what NSLocaleUsesMetricSystem will tell you).
Asked
Active
Viewed 54 times
1 Answers
0
Maybe not completely satisfactory, but in answer to my own question, I found: https://github.com/apache/cordova-plugin-globalization. Checking for "en-US" as the locale name can be used to set "imperial" vs. "metric" measurements. Reference.