0

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).

Rob Welan
  • 2,070
  • 1
  • 11
  • 20

1 Answers1

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.

Community
  • 1
  • 1
Rob Welan
  • 2,070
  • 1
  • 11
  • 20