ICU-6434 Use the first extlang as locale ID language in uloc_forLanguageTag.

X-SVN-Rev: 25853
This commit is contained in:
Yoshito Umaoka 2009-04-21 06:17:54 +00:00
parent 45b1476974
commit a22f179e2b
2 changed files with 2 additions and 1 deletions

View File

@ -2147,7 +2147,7 @@ uloc_forLanguageTag(const char* langtag,
} }
/* language */ /* language */
subtag = ultag_getLanguage(lt); subtag = ultag_getExtlangSize(lt) > 0 ? ultag_getExtlang(lt, 0) : ultag_getLanguage(lt);
if (uprv_strcmp(subtag, LANG_UND) != 0) { if (uprv_strcmp(subtag, LANG_UND) != 0) {
len = uprv_strlen(subtag); len = uprv_strlen(subtag);
if (len > 0) { if (len > 0) {

View File

@ -5452,6 +5452,7 @@ static const struct {
{"en-latn-x", "en_Latn", 7}, {"en-latn-x", "en_Latn", 7},
{"art-lojban", "jbo", 10}, {"art-lojban", "jbo", 10},
{"zh-hakka", "hak", 8}, {"zh-hakka", "hak", 8},
{"zh-cmn-CH", "cmn_CH", 9},
{"xxx-yy", "xxx_YY", 6}, {"xxx-yy", "xxx_YY", 6},
{"fr-234", "fr_234", 6}, {"fr-234", "fr_234", 6},
{"i-default", "", 9}, {"i-default", "", 9},