Index: /trunk/resources/data/boundaries.osm
===================================================================
--- /trunk/resources/data/boundaries.osm	(revision 16108)
+++ /trunk/resources/data/boundaries.osm	(revision 16109)
@@ -21388,4 +21388,5 @@
     <nd ref='-7116' />
     <tag k='ISO3166-1:alpha2' v='BH' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='Bahrain' />
   </way>
@@ -26617,4 +26618,5 @@
     <nd ref='-9548' />
     <tag k='ISO3166-1:alpha2' v='EG' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='Egypt, Arab Rep.' />
   </way>
@@ -30198,4 +30200,5 @@
     <nd ref='-9490' />
     <tag k='ISO3166-1:alpha2' v='IQ' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='Iraq' />
   </way>
@@ -30448,4 +30451,5 @@
     <nd ref='-9584' />
     <tag k='ISO3166-1:alpha2' v='JO' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='Jordan' />
   </way>
@@ -31299,4 +31303,5 @@
     <nd ref='-9888' />
     <tag k='ISO3166-1:alpha2' v='KH' />
+    <tag k='ldml:nu:km' v='khmr' />
     <tag k='name:en' v='Cambodia' />
   </way>
@@ -31458,4 +31463,5 @@
     <nd ref='-9928' />
     <tag k='ISO3166-1:alpha2' v='KW' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='Kuwait' />
   </way>
@@ -31864,4 +31870,5 @@
     <nd ref='-11224' />
     <tag k='ISO3166-1:alpha2' v='LB' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='Lebanon' />
   </way>
@@ -36221,4 +36228,5 @@
     <nd ref='-11040' />
     <tag k='ISO3166-1:alpha2' v='QA' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='Qatar' />
   </way>
@@ -36680,4 +36688,5 @@
     <nd ref='-9512' />
     <tag k='ISO3166-1:alpha2' v='SA' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='Saudi Arabia' />
   </way>
@@ -38157,4 +38166,5 @@
     <nd ref='-11220' />
     <tag k='ISO3166-1:alpha2' v='SY' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='Syrian Arab Republic' />
   </way>
@@ -41300,4 +41310,5 @@
     <nd ref='-11556' />
     <tag k='ISO3166-1:alpha2' v='YE' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='Yemen, Rep.' />
   </way>
@@ -58297,4 +58308,5 @@
     <member type='way' ref='-28920' role='inner' />
     <tag k='ISO3166-1:alpha2' v='AE' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='United Arab Emirates' />
     <tag k='type' v='multipolygon' />
@@ -58509,4 +58521,5 @@
     <member type='way' ref='-29158' role='outer' />
     <tag k='ISO3166-1:alpha2' v='OM' />
+    <tag k='ldml:nu:ar' v='arab' />
     <tag k='name:en' v='Oman' />
     <tag k='type' v='multipolygon' />
Index: /trunk/src/org/openstreetmap/josm/gui/MainInitialization.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainInitialization.java	(revision 16108)
+++ /trunk/src/org/openstreetmap/josm/gui/MainInitialization.java	(revision 16109)
@@ -20,5 +20,4 @@
 import org.openstreetmap.josm.data.validation.OsmValidator;
 import org.openstreetmap.josm.gui.layer.ImageryLayer;
-import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.layer.TMSLayer;
 import org.openstreetmap.josm.gui.preferences.imagery.ImageryPreference;
@@ -98,6 +97,6 @@
                         // Otherwise they would not have been able to load the layers in the first place because they would have been disabled
                         if (MainApplication.isDisplayingMapView()) {
-                            for (Layer l : MainApplication.getLayerManager().getLayersOfType(ImageryLayer.class)) {
-                                if (((ImageryLayer) l).getInfo().isBlacklisted()) {
+                            for (ImageryLayer l : MainApplication.getLayerManager().getLayersOfType(ImageryLayer.class)) {
+                                if (l.getInfo().isBlacklisted()) {
                                     Logging.info(tr("Removed layer {0} because it is not allowed by the configured API.", l.getName()));
                                     MainApplication.getLayerManager().removeLayer(l);
@@ -116,4 +115,5 @@
                 }),
             new InitializationTask(tr("Initializing internal traffic data"), RightAndLefthandTraffic::initialize),
+            new InitializationTask(tr("Initializing numbering format"), I18n::initializeNumberingFormat),
             new InitializationTask(tr("Initializing validator"), OsmValidator::initialize),
             new InitializationTask(tr("Initializing presets"), TaggingPresets::initialize),
Index: /trunk/src/org/openstreetmap/josm/tools/I18n.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 16108)
+++ /trunk/src/org/openstreetmap/josm/tools/I18n.java	(revision 16109)
@@ -23,4 +23,6 @@
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
+
+import org.openstreetmap.josm.data.osm.TagMap;
 
 /**
@@ -341,4 +343,10 @@
     }
 
+    /**
+     * Espaces the special i18n characters <code>'{}</code> with quotes.
+     * @param msg unescaped string
+     * @return escaped string
+     * @since 4477
+     */
     public static String escape(String msg) {
         if (msg == null) return null;
@@ -626,4 +634,24 @@
     }
 
+    /**
+     * Updates the default locale : overrides the numbering system, if defined in internal boudnaries.xml for the current language/country.
+     * @since 16109
+     */
+    public static void initializeNumberingFormat() {
+        Locale l = Locale.getDefault();
+        TagMap tags = Territories.getCustomTags(l.getCountry());
+        if (tags != null) {
+            String numberingSystem = tags.get("ldml:nu:" + l.getLanguage());
+            if (numberingSystem != null && !numberingSystem.equals(l.getExtension(Locale.UNICODE_LOCALE_EXTENSION))) {
+                Locale.setDefault(new Locale.Builder()
+                        .setLanguage(l.getLanguage())
+                        .setRegion(l.getCountry())
+                        .setVariant(l.getVariant())
+                        .setExtension(Locale.UNICODE_LOCALE_EXTENSION, numberingSystem)
+                        .build());
+            }
+        }
+    }
+
     private static int pluralEval(long n) {
         switch(pluralMode) {
Index: /trunk/src/org/openstreetmap/josm/tools/Territories.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Territories.java	(revision 16108)
+++ /trunk/src/org/openstreetmap/josm/tools/Territories.java	(revision 16109)
@@ -8,4 +8,5 @@
 import java.io.InputStream;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -33,4 +34,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Relation;
+import org.openstreetmap.josm.data.osm.TagMap;
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.io.CachedFile;
@@ -58,4 +60,7 @@
     private static volatile Map<String, TaginfoRegionalInstance> taginfoCache;
     private static volatile Map<String, TaginfoRegionalInstance> taginfoGeofabrikCache;
+    private static volatile Map<String, TagMap> customTagsCache;
+
+    private static final List<String> KNOWN_KEYS = Arrays.asList(ISO3166_1, ISO3166_2, TAGINFO, "type", "name:en", "driving_side", "note");
 
     private Territories() {
@@ -128,4 +133,5 @@
         iso3166Cache = new HashMap<>();
         taginfoCache = new TreeMap<>();
+        customTagsCache = new TreeMap<>();
         try (CachedFile cf = new CachedFile("resource://data/" + FILENAME);
                 InputStream is = cf.getInputStream()) {
@@ -137,4 +143,6 @@
                 String iso2 = osm.get(ISO3166_2);
                 if (iso1 != null || iso2 != null) {
+                    TagMap tags = osm.getKeys();
+                    KNOWN_KEYS.forEach(tags::remove);
                     GeoProperty<Boolean> gp;
                     if (osm instanceof Way) {
@@ -144,6 +152,7 @@
                     }
                     GeoPropertyIndex<Boolean> gpi = new GeoPropertyIndex<>(gp, 24);
+                    addInCache(iso1, gpi, tags);
+                    addInCache(iso2, gpi, tags);
                     if (iso1 != null) {
-                        iso3166Cache.put(iso1, gpi);
                         String taginfo = osm.get(TAGINFO);
                         if (taginfo != null) {
@@ -151,11 +160,17 @@
                         }
                     }
-                    if (iso2 != null) {
-                        iso3166Cache.put(iso2, gpi);
-                    }
                 }
             }
         } catch (IOException | IllegalDataException ex) {
             throw new JosmRuntimeException(ex);
+        }
+    }
+
+    private static void addInCache(String code, GeoPropertyIndex<Boolean> gpi, TagMap tags) {
+        if (code != null) {
+            iso3166Cache.put(code, gpi);
+            if (!tags.isEmpty()) {
+                customTagsCache.put(code, tags);
+            }
         }
     }
@@ -216,3 +231,14 @@
                 .collect(Collectors.toList());
     }
+
+    /**
+     * Returns the map of custom tags for a territory with the given ISO3166-1 or ISO3166-2 code.
+     *
+     * @param code the ISO3166-1 or ISO3166-2 code
+     * @return the map of custom tags for a territory with the given ISO3166-1 or ISO3166-2 code, or {@code null}
+     * @since 16109
+     */
+    public static TagMap getCustomTags(String code) {
+        return code != null ? customTagsCache.get(code) : null;
+    }
 }
Index: /trunk/test/unit/org/openstreetmap/josm/tools/TerritoriesTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/TerritoriesTest.java	(revision 16108)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/TerritoriesTest.java	(revision 16109)
@@ -4,4 +4,5 @@
 import static java.util.Collections.singleton;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
@@ -90,3 +91,13 @@
         assertTrue(error, error.contains(": Invalid token=EOF at (line no=3,"));
     }
+
+    /**
+     * Unit test of {@link Territories#getCustomTags}
+     */
+    @Test
+    public void testGetCustomTags() {
+        assertNull(Territories.getCustomTags(null));
+        assertNull(Territories.getCustomTags("foo"));
+        assertEquals("arab", Territories.getCustomTags("BH").get("ldml:nu:ar"));
+    }
 }
