Changeset 3418 in josm


Ignore:
Timestamp:
2010-08-05T18:31:22+02:00 (14 years ago)
Author:
stoecker
Message:

fixed locale handling a bit

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/I18n.java

    r3415 r3418  
    424424     * given by <code>localName</code>.
    425425     *
    426      * Ignored if localName is null. If the locale with name <code>localName</code>
     426     * Ignored if localeName is null. If the locale with name <code>localName</code>
    427427     * isn't found the default local is set to <tt>en</tt> (english).
    428428     *
  • trunk/src/org/openstreetmap/josm/tools/LanguageInfo.java

    r3161 r3418  
    1919        if (code.length() == 2) {
    2020            if (code.equals("en")) return "";
     21        } else if (code.equals("zh_TW") || code.equals("zh_CN")) {
     22            /* do nothing */
    2123        } else if (code.matches("[^_]+_[^_]+")) {
    2224            code = code.substring(0,2);
     
    5052
    5153    /**
    52      * Replies the local code used by JOSM for a given locale.
     54     * Replies the locale code used by JOSM for a given locale.
    5355     *
    5456     * In most cases JOSM uses the 2-character ISO 639 language code ({@see Locale#getLanguage()}
     
    6567            return "he";
    6668        /* list of non-single codes supported by josm */
    67         else if (full.equals("en_GB") || full.equals("en_AU"))
     69        else if (full.equals("en_GB") || full.equals("pt_BR") || full.equals("en_AU") || full.equals("zh_TW") || full.equals("zh_CN"))
    6870            return full;
    6971
Note: See TracChangeset for help on using the changeset viewer.