summaryrefslogtreecommitdiff
path: root/i18nlangtag/source
diff options
context:
space:
mode:
Diffstat (limited to 'i18nlangtag/source')
-rw-r--r--i18nlangtag/source/isolang/isolang.cxx3
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx9
2 files changed, 11 insertions, 1 deletions
diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx
index e0b1383f0510..157598d5cfde 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -741,7 +741,8 @@ static Bcp47CountryEntry const aImplBcp47CountryEntries[] =
// MS-LangID full BCP47, ISO3166, ISO639-Variant or other fallback
{ LANGUAGE_CATALAN_VALENCIAN, "ca-ES-valencia", "ES", "ca-valencia" },
{ LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN, "ca-ES-valencia", "ES", "" }, // In case MS format files using the old value escaped into the wild, map them back.
- { LANGUAGE_USER_ENGLISH_UK_OED, "en-GB-oed", "GB", "" }, // grandfathered
+ { LANGUAGE_USER_ENGLISH_UK_OED, "en-GB-oed", "GB", "" }, // grandfathered, deprecated, prefer en-GB-oxendict
+ { LANGUAGE_USER_ENGLISH_UK_OXENDICT,"en-GB-oxendict", "GB", "" },
// { LANGUAGE_YUE_CHINESE_HONGKONG, "zh-yue-HK", "HK", "" }, // MS reserved, prefer yue-HK; do not add unless LanguageTag::simpleExtract() can handle it to not call liblangtag for rsc!
{ LANGUAGE_DONTKNOW, "", "", "" } // marks end of table
};
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 15cf405b5841..906c7b3cc94a 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -2150,6 +2150,15 @@ LanguageTag & LanguageTag::makeFallback()
getBcp47(); // have maBcp47 now
if (bIncludeFullBcp47)
aVec.push_back( maBcp47);
+
+ // Special cases for deprecated tags and their replacements, include both
+ // in fallbacks in a sensible order.
+ /* TODO: could such things be generalized and automated with liblangtag? */
+ if (maBcp47 == "en-GB-oed")
+ aVec.push_back( "en-GB-oxendict");
+ else if (maBcp47 == "en-GB-oxendict")
+ aVec.push_back( "en-GB-oed");
+
OUString aScript;
OUString aVariants( getVariants());
OUString aTmp;