diff --git a/android/src/com/mapswithme/maps/UnitLocale.java b/android/src/com/mapswithme/maps/UnitLocale.java new file mode 100644 index 0000000000..f1aca921ba --- /dev/null +++ b/android/src/com/mapswithme/maps/UnitLocale.java @@ -0,0 +1,17 @@ +package com.mapswithme.maps; + +import java.util.Locale; + +public class UnitLocale { + public static UnitLocale Imperial = new UnitLocale(); + public static UnitLocale Metric = new UnitLocale(); + + public static UnitLocale getCurrent() + { + String countryCode = Locale.getDefault().getCountry(); + if ("US".equals(countryCode)) return Imperial; // USA + if ("LR".equals(countryCode)) return Imperial; // liberia + if ("MM".equals(countryCode)) return Imperial; // burma + return Metric; + } +}