Index: /trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java	(revision 15660)
+++ /trunk/src/org/openstreetmap/josm/data/SystemOfMeasurement.java	(revision 15661)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.data.preferences.StringProperty;
 import org.openstreetmap.josm.spi.preferences.Config;
+import org.openstreetmap.josm.tools.LanguageInfo;
 
 /**
@@ -289,5 +290,9 @@
      */
     public static SystemOfMeasurement getDefault() {
-        switch (Locale.getDefault().getCountry()) {
+        final String country = Optional.ofNullable(System.getenv("LC_MEASUREMENT"))
+                .map(LanguageInfo::getLocale)
+                .orElse(Locale.getDefault())
+                .getCountry();
+        switch (country) {
             case "US":
                 // https://en.wikipedia.org/wiki/Metrication_in_the_United_States#Current_use
Index: /trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java	(revision 15660)
+++ /trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java	(revision 15661)
@@ -203,5 +203,5 @@
      * Replies the locale used by Java for a given language code.
      *
-     * Accepts JOSM and Java codes as input.
+     * Accepts JOSM, Java and POSIX codes as input.
      *
      * @param localeName the locale code.
@@ -211,4 +211,8 @@
      */
     public static Locale getLocale(String localeName, boolean useDefaultCountry) {
+        final int encoding = localeName.indexOf('.');
+        if (encoding > 0) {
+            localeName = localeName.substring(0, encoding);
+        }
         int country = localeName.indexOf('_');
         int variant = localeName.indexOf('@');
Index: /trunk/test/unit/org/openstreetmap/josm/tools/LanguageInfoTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/LanguageInfoTest.java	(revision 15660)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/LanguageInfoTest.java	(revision 15661)
@@ -63,4 +63,17 @@
 
     /**
+     * Unit test of {@link LanguageInfo#getLocale}.
+     */
+    @Test
+    public void testGetLocale() {
+        Assert.assertEquals(RU, LanguageInfo.getLocale("ru"));
+        Assert.assertEquals(EN_GB, LanguageInfo.getLocale("en_GB"));
+        Assert.assertEquals(CA_ES_VALENCIA, LanguageInfo.getLocale("ca_ES@valencia"));
+        Assert.assertEquals(DE_DE, LanguageInfo.getLocale("de_DE"));
+        Assert.assertEquals(DE_DE, LanguageInfo.getLocale("de_DE.UTF-8")); // LANG, LC_MEASUREMENT
+        Assert.assertEquals(PT_BR, LanguageInfo.getLocale("pt_BR.UTF-8")); // LANG, LC_MEASUREMENT
+    }
+
+    /**
      * Unit test of {@link LanguageInfo#getJOSMLocaleCode}.
      */
