NSLocale: usesMetricSystem property
The usesMetricSystem property indicates whether this locale uses the metric system.
Value
A boolean.
- Read-only. Assigning to it throws
TypeError, and the value stays unchanged. true: uses the metric system (meters, kilograms, degrees Celsius).de_DEreadstrue.false: does not use the metric system.en_USreadsfalse.
Examples
js
console.log(new NSLocale('en_US').usesMetricSystem);Result: prints false.
Corresponding iOS API
NSLocale.usesMetricSystem.