summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-09-04 21:04:30 +0200
committerEike Rathke <erack@redhat.com>2013-09-04 21:11:07 +0200
commita25846baf1137e7086292d8d8824a94f6a825166 (patch)
treec214908075b006de31d0d3a2127df9292c62dc90
parentbcaf95fbbc7b463ee2c9917f05bb618f5f1bc1fd (diff)
for zh-HK or zh-MO also list zh-TW as fallback
Change-Id: If86d7df0c9ed84f704c0f2421820f3d9c060f2fd
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 63da4fc0b926..f2f2becb46cd 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -1227,7 +1227,12 @@ LanguageTag & LanguageTag::makeFallback()
if (isIsoLocale())
{
if (!aCountry.isEmpty())
+ {
aVec.push_back( aLanguage + "-" + aCountry);
+ // For zh-HK or zh-MO also list zh-TW
+ if (aLanguage == "zh" && (aCountry == "HK" || aCountry == "MO"))
+ aVec.push_back( aLanguage + "-TW");
+ }
aVec.push_back( aLanguage);
return aVec;
}