summaryrefslogtreecommitdiff
path: root/i18nlangtag/source/languagetag/languagetag.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-07-10 01:15:50 +0200
committerEike Rathke <erack@redhat.com>2015-07-10 01:25:01 +0200
commit122a15f4a6c09d35db58fe3a7b943b5ea79cbe65 (patch)
tree8efa21c3a6f0a5b30ee77d5a8eae0b48a1ba6df9 /i18nlangtag/source/languagetag/languagetag.cxx
parent701e21b25dda87a3f1feca1137c6ceab8a5363ab (diff)
support en-GB-oxendict additionally to now deprecated en-GB-oed
Have them separated so when saving loaded documents the same tag is used to keep the generator happy. When to switch in UI language listbox? Or should we have both entries? Change-Id: If78600229c4b24f6ee598c25d5a8974fef410bb5
Diffstat (limited to 'i18nlangtag/source/languagetag/languagetag.cxx')
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx9
1 files changed, 9 insertions, 0 deletions
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;