Index: trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 7893)
+++ trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 7894)
@@ -39,7 +39,40 @@
     }
 
+    /**
+     * Enumeration of possible plural modes.
+     * See <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html">CLDR</a>
+     * for a complete list.
+     * @see #pluralEval
+     */
     private enum PluralMode {
-        MODE_NOTONE, MODE_NONE, MODE_GREATERONE,
-        MODE_CS/*, MODE_AR*/, MODE_PL/*, MODE_RO*/, MODE_RU, MODE_SK/*, MODE_SL*/}
+        /** Plural = Not 1. This is the default for many languages, including English: 1 day, but 0 days or 2 days. */
+        MODE_NOTONE,
+        /** No plural. Mainly for Asian languages (Indonesian, Chinese, Japanese, ...) */
+        MODE_NONE,
+        /** Plural = Greater than 1. For some latin languages (French, Brazilian Portuguese) */
+        MODE_GREATERONE,
+        /* Special mode for
+         * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ar">Arabic</a>.*
+        MODE_AR,*/
+        /** Special mode for
+         * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#cs">Czech</a>. */
+        MODE_CS,
+        /** Special mode for
+         * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#pl">Polish</a>. */
+        MODE_PL,
+        /* Special mode for
+         * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ro">Romanian</a>.*
+        MODE_RO,*/
+        /** Special mode for
+         * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#ru">Russian</a>. */
+        MODE_RU,
+        /** Special mode for
+         * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#sk">Slovak</a>. */
+        MODE_SK,
+        /* Special mode for
+         * <a href="http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#sl">Slovenian</a>.*
+        MODE_SL,*/
+    }
+
     private static PluralMode pluralMode = PluralMode.MODE_NOTONE; /* english default */
     private static String loadedCode = "en";
@@ -353,4 +386,10 @@
      */
     public static void init() {
+        // Enable CLDR locale provider on Java 8 to get additional languages, such as Khmer.
+        // http://docs.oracle.com/javase/8/docs/technotes/guides/intl/enhancements.8.html#cldr
+        // This can be removed after we switch to a minimal version of Java that enables CLDR by default
+        // or includes all languages we need in the JRE. See http://openjdk.java.net/jeps/8043554 for Java 9
+        Utils.updateSystemProperty("java.locale.providers", "JRE,CLDR");
+
         //languages.put("ar", PluralMode.MODE_AR);
         languages.put("bg", PluralMode.MODE_NOTONE);
@@ -374,4 +413,8 @@
         languages.put("it", PluralMode.MODE_NOTONE);
         languages.put("ja", PluralMode.MODE_NONE);
+        if (Main.isJava8orLater()) {
+            // Java 8 and later code
+            languages.put("km", PluralMode.MODE_NONE);
+        }
         //languages.put("nb", PluralMode.MODE_NOTONE);
         languages.put("nl", PluralMode.MODE_NOTONE);
@@ -649,5 +692,5 @@
         case MODE_NOTONE: /* bg, da, de, el, en, en_GB, es, et, eu, fi, gl, is, it, iw_IL, nb, nl, sv */
             return ((n != 1) ? 1 : 0);
-        case MODE_NONE: /* ja, tr, zh_CN, zh_TW */
+        case MODE_NONE: /* id, ja, km, tr, zh_CN, zh_TW */
             return 0;
         case MODE_GREATERONE: /* fr, pt_BR */
Index: trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 7893)
+++ trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 7894)
@@ -19,5 +19,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.OpenFileAction.OpenFileTask;
-import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.io.OsmTransferException;
 import org.xml.sax.SAXException;
@@ -37,5 +36,5 @@
         // And will not work when one of the system independent LAFs is used.
         // They just insist on painting themselves...
-        Preferences.updateSystemProperty("apple.laf.useScreenMenuBar", "true");
+        Utils.updateSystemProperty("apple.laf.useScreenMenuBar", "true");
         migrateOldDirectory();
     }
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 7893)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 7894)
@@ -1144,3 +1144,23 @@
         return new Pair<>(noThreads, pool);
     }
+
+    /**
+     * Updates a given system property.
+     * @param key The property key
+     * @param value The property value
+     * @return the previous value of the system property, or {@code null} if it did not have one.
+     * @since 7894
+     */
+    public static String updateSystemProperty(String key, String value) {
+        if (value != null) {
+            String old = System.setProperty(key, value);
+            if (!key.toLowerCase().contains("password")) {
+                Main.debug("System property '"+key+"' set to '"+value+"'. Old value was '"+old+"'");
+            } else {
+                Main.debug("System property '"+key+"' changed.");
+            }
+            return old;
+        }
+        return null;
+    }
 }
