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;
+    }
 }
