bump product version to 7.6.3.2-android
[LibreOffice.git] / i18nlangtag / source / isolang / mslangid.cxx
blobaa913a7f7ff42572c1a408de4b8f71500bb1078a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sal/config.h>
21 #include <sal/log.hxx>
22 #include <rtl/ustring.hxx>
23 #include <com/sun/star/i18n/ScriptType.hpp>
25 #include <i18nlangtag/mslangid.hxx>
27 // Only very limited few functions that are guaranteed to not be called from
28 // LanguageTag may use LanguageTag ...
29 #include <i18nlangtag/languagetag.hxx>
32 LanguageType MsLangId::nConfiguredSystemLanguage = LANGUAGE_SYSTEM;
33 LanguageType MsLangId::nConfiguredSystemUILanguage = LANGUAGE_SYSTEM;
35 LanguageType MsLangId::nConfiguredWesternFallback = LANGUAGE_SYSTEM;
36 LanguageType MsLangId::nConfiguredAsianFallback = LANGUAGE_SYSTEM;
37 LanguageType MsLangId::nConfiguredComplexFallback = LANGUAGE_SYSTEM;
39 // static
40 void MsLangId::LanguageTagAccess::setConfiguredSystemLanguage( LanguageType nLang )
42 nConfiguredSystemLanguage = nLang;
46 // static
47 void MsLangId::setConfiguredSystemUILanguage( LanguageType nLang )
49 nConfiguredSystemUILanguage = nLang;
52 // static
53 void MsLangId::setConfiguredWesternFallback( LanguageType nLang )
55 nConfiguredWesternFallback = nLang;
58 // static
59 void MsLangId::setConfiguredAsianFallback( LanguageType nLang )
61 nConfiguredAsianFallback = nLang;
64 // static
65 void MsLangId::setConfiguredComplexFallback( LanguageType nLang )
67 nConfiguredComplexFallback = nLang;
70 // static
71 inline LanguageType MsLangId::simplifySystemLanguages( LanguageType nLang )
73 if (nLang.anyOf( LANGUAGE_PROCESS_OR_USER_DEFAULT,
74 LANGUAGE_SYSTEM_DEFAULT,
75 LANGUAGE_SYSTEM))
76 nLang = LANGUAGE_SYSTEM;
77 return nLang;
80 // static
81 LanguageType MsLangId::getRealLanguage( LanguageType nLang )
83 LanguageType simplifyLang = simplifySystemLanguages( nLang);
84 if (simplifyLang == LANGUAGE_SYSTEM )
85 nLang = getConfiguredSystemLanguage();
86 else if (simplifyLang == LANGUAGE_HID_HUMAN_INTERFACE_DEVICE)
87 nLang = getConfiguredSystemUILanguage();
88 else
90 /* TODO: would this be useful here? */
91 //nLang = MsLangId::getReplacementForObsoleteLanguage( nLang);
92 ; // nothing
94 if (nLang == LANGUAGE_DONTKNOW)
95 nLang = LANGUAGE_ENGLISH_US;
96 return nLang;
100 // static
101 LanguageType MsLangId::getConfiguredSystemLanguage()
103 if (nConfiguredSystemLanguage != LANGUAGE_SYSTEM)
104 return nConfiguredSystemLanguage;
105 SAL_WARN("i18nlangtag", "MsLangId::getConfiguredSystemLanguage() - not configured yet");
106 return getSystemLanguage();
110 // static
111 LanguageType MsLangId::getConfiguredSystemUILanguage()
113 if (nConfiguredSystemUILanguage != LANGUAGE_SYSTEM)
114 return nConfiguredSystemUILanguage;
115 SAL_WARN("i18nlangtag", "MsLangId::getConfiguredSystemUILanguage() - not configured yet");
116 return getSystemUILanguage();
120 // static
121 LanguageType MsLangId::getSystemLanguage()
123 return getPlatformSystemLanguage();
127 // static
128 LanguageType MsLangId::getSystemUILanguage()
130 return getPlatformSystemUILanguage();
134 // static
135 LanguageType MsLangId::resolveSystemLanguageByScriptType( LanguageType nLang, sal_Int16 nType )
137 if (nLang == LANGUAGE_NONE)
138 return nLang;
140 nLang = getRealLanguage(nLang);
141 if (nType != css::i18n::ScriptType::WEAK && getScriptType(nLang) != nType)
143 switch(nType)
145 case css::i18n::ScriptType::ASIAN:
146 if (nConfiguredAsianFallback == LANGUAGE_SYSTEM)
147 nLang = LANGUAGE_CHINESE_SIMPLIFIED;
148 else
149 nLang = nConfiguredAsianFallback;
150 break;
151 case css::i18n::ScriptType::COMPLEX:
152 if (nConfiguredComplexFallback == LANGUAGE_SYSTEM)
153 nLang = LANGUAGE_HINDI;
154 else
155 nLang = nConfiguredComplexFallback;
156 break;
157 default:
158 if (nConfiguredWesternFallback == LANGUAGE_SYSTEM)
159 nLang = LANGUAGE_ENGLISH_US;
160 else
161 nLang = nConfiguredWesternFallback;
162 break;
165 return nLang;
168 // static
169 bool MsLangId::usesHyphenation(LanguageType nLang)
171 if (primary(nLang).anyOf(
172 primary(LANGUAGE_ARABIC_PRIMARY_ONLY),
173 primary(LANGUAGE_FARSI),
174 primary(LANGUAGE_KASHMIRI),
175 primary(LANGUAGE_KURDISH_ARABIC_IRAQ),
176 primary(LANGUAGE_PUNJABI),
177 primary(LANGUAGE_SINDHI),
178 primary(LANGUAGE_USER_MALAY_ARABIC_MALAYSIA),
179 primary(LANGUAGE_SOMALI),
180 primary(LANGUAGE_SWAHILI),
181 primary(LANGUAGE_URDU_PAKISTAN),
182 primary(LANGUAGE_PASHTO),
183 primary(LANGUAGE_VIETNAMESE))
184 || isCJK(nLang))
186 return false;
188 return true;
192 // static
193 css::lang::Locale MsLangId::Conversion::convertLanguageToLocale(
194 LanguageType nLang, bool bIgnoreOverride )
196 css::lang::Locale aLocale;
197 // Still resolve LANGUAGE_DONTKNOW if resolving is not requested,
198 // but not LANGUAGE_SYSTEM or others.
199 LanguageType nOrigLang = nLang;
200 nLang = MsLangId::getRealLanguage(nLang);
201 convertLanguageToLocaleImpl( nLang, aLocale, bIgnoreOverride );
202 if (aLocale.Language.isEmpty() && simplifySystemLanguages(nOrigLang) == LANGUAGE_SYSTEM)
204 // None found but resolve requested, last resort is "en-US".
205 aLocale.Language = "en";
206 aLocale.Country = "US";
207 aLocale.Variant.clear();
209 return aLocale;
213 // static
214 LanguageType MsLangId::Conversion::convertLocaleToLanguage(
215 const css::lang::Locale& rLocale )
217 // empty language => LANGUAGE_SYSTEM
218 if (rLocale.Language.isEmpty())
219 return LANGUAGE_SYSTEM;
221 return convertLocaleToLanguageImpl( rLocale);
225 // static
226 css::lang::Locale MsLangId::getFallbackLocale(
227 const css::lang::Locale & rLocale )
229 // empty language => LANGUAGE_SYSTEM
230 if (rLocale.Language.isEmpty())
231 return Conversion::lookupFallbackLocale( Conversion::convertLanguageToLocale( LANGUAGE_SYSTEM, false));
232 else
233 return Conversion::lookupFallbackLocale( rLocale);
236 // static
237 bool MsLangId::isRightToLeft( LanguageType nLang )
239 if (primary(nLang).anyOf(
240 primary(LANGUAGE_ARABIC_SAUDI_ARABIA),
241 primary(LANGUAGE_HEBREW),
242 primary(LANGUAGE_YIDDISH),
243 primary(LANGUAGE_URDU_PAKISTAN),
244 primary(LANGUAGE_FARSI),
245 primary(LANGUAGE_KASHMIRI),
246 primary(LANGUAGE_SINDHI),
247 primary(LANGUAGE_UIGHUR_CHINA),
248 primary(LANGUAGE_USER_KYRGYZ_CHINA),
249 primary(LANGUAGE_USER_NKO),
250 primary(LANGUAGE_USER_SARAIKI)))
252 return true;
254 if (nLang.anyOf(
255 LANGUAGE_USER_KURDISH_IRAN,
256 LANGUAGE_OBSOLETE_USER_KURDISH_IRAQ,
257 LANGUAGE_KURDISH_ARABIC_IRAQ,
258 LANGUAGE_KURDISH_ARABIC_LSO,
259 LANGUAGE_USER_KURDISH_SOUTHERN_IRAN,
260 LANGUAGE_USER_KURDISH_SOUTHERN_IRAQ,
261 LANGUAGE_USER_HUNGARIAN_ROVAS,
262 LANGUAGE_USER_MALAY_ARABIC_MALAYSIA,
263 LANGUAGE_USER_ROHINGYA_HANIFI,
264 LANGUAGE_USER_MALAY_ARABIC_BRUNEI))
266 return true;
268 if (LanguageTag::isOnTheFlyID(nLang))
269 return LanguageTag::getOnTheFlyScriptType(nLang) == LanguageTag::ScriptType::RTL;
270 return false;
273 // static
274 bool MsLangId::isRightToLeftMath( LanguageType nLang )
276 //http://www.w3.org/TR/arabic-math/
277 if (nLang == LANGUAGE_FARSI || nLang == LANGUAGE_ARABIC_MOROCCO)
278 return false;
279 return isRightToLeft(nLang);
282 // static
283 bool MsLangId::isSimplifiedChinese( LanguageType nLang )
285 return isChinese(nLang) && !isTraditionalChinese(nLang);
288 // static
289 bool MsLangId::isSimplifiedChinese( const css::lang::Locale & rLocale )
291 return rLocale.Language == "zh" && !isTraditionalChinese(rLocale);
294 // static
295 bool MsLangId::isTraditionalChinese( LanguageType nLang )
297 return nLang.anyOf(
298 LANGUAGE_CHINESE_TRADITIONAL,
299 LANGUAGE_CHINESE_HONGKONG,
300 LANGUAGE_CHINESE_MACAU);
303 // static
304 bool MsLangId::isTraditionalChinese( const css::lang::Locale & rLocale )
306 return rLocale.Language == "zh" && (rLocale.Country == "TW" || rLocale.Country == "HK" || rLocale.Country == "MO");
309 //static
310 bool MsLangId::isChinese( LanguageType nLang )
312 return MsLangId::getPrimaryLanguage(nLang) == MsLangId::getPrimaryLanguage(LANGUAGE_CHINESE) ||
313 MsLangId::getPrimaryLanguage(nLang) == MsLangId::getPrimaryLanguage(LANGUAGE_YUE_CHINESE_HONGKONG);
316 //static
317 bool MsLangId::isKorean( LanguageType nLang )
319 return MsLangId::getPrimaryLanguage(nLang) == MsLangId::getPrimaryLanguage(LANGUAGE_KOREAN);
322 // static
323 bool MsLangId::isCJK( LanguageType nLang )
325 if (primary(nLang).anyOf(
326 primary(LANGUAGE_CHINESE),
327 primary(LANGUAGE_YUE_CHINESE_HONGKONG),
328 primary(LANGUAGE_JAPANESE),
329 primary(LANGUAGE_KOREAN)))
331 return true;
333 if (LanguageTag::isOnTheFlyID(nLang))
334 return LanguageTag::getOnTheFlyScriptType(nLang) == LanguageTag::ScriptType::CJK;
335 return false;
338 // static
339 bool MsLangId::isFamilyNameFirst( LanguageType nLang )
341 return isCJK(nLang) || nLang == LANGUAGE_HUNGARIAN;
344 // static
345 bool MsLangId::hasForbiddenCharacters( LanguageType nLang )
347 return isCJK(nLang);
351 // static
352 bool MsLangId::needsSequenceChecking( LanguageType nLang )
354 return primary(nLang).anyOf(
355 primary(LANGUAGE_BURMESE),
356 primary(LANGUAGE_KHMER),
357 primary(LANGUAGE_LAO),
358 primary(LANGUAGE_THAI))
359 || nLang.anyOf(
360 LANGUAGE_USER_PALI_THAI);
364 // static
365 sal_Int16 MsLangId::getScriptType( LanguageType nLang )
367 sal_Int16 nScript;
369 // CTL
370 if( nLang.anyOf(
371 LANGUAGE_MONGOLIAN_MONGOLIAN_MONGOLIA,
372 LANGUAGE_MONGOLIAN_MONGOLIAN_CHINA,
373 LANGUAGE_MONGOLIAN_MONGOLIAN_LSO,
374 LANGUAGE_USER_KURDISH_IRAN,
375 LANGUAGE_OBSOLETE_USER_KURDISH_IRAQ,
376 LANGUAGE_KURDISH_ARABIC_IRAQ,
377 LANGUAGE_KURDISH_ARABIC_LSO,
378 LANGUAGE_USER_KURDISH_SOUTHERN_IRAN,
379 LANGUAGE_USER_KURDISH_SOUTHERN_IRAQ,
380 LANGUAGE_USER_KYRGYZ_CHINA,
381 LANGUAGE_USER_HUNGARIAN_ROVAS,
382 LANGUAGE_USER_MANCHU,
383 LANGUAGE_USER_XIBE,
384 LANGUAGE_USER_MALAY_ARABIC_MALAYSIA,
385 LANGUAGE_USER_MALAY_ARABIC_BRUNEI,
386 LANGUAGE_USER_ROHINGYA_HANIFI,
387 LANGUAGE_USER_PALI_THAI))
389 nScript = css::i18n::ScriptType::COMPLEX;
391 // "Western"
392 else if (nLang.anyOf(
393 LANGUAGE_MONGOLIAN_CYRILLIC_MONGOLIA,
394 LANGUAGE_MONGOLIAN_CYRILLIC_LSO,
395 LANGUAGE_USER_KURDISH_SYRIA,
396 LANGUAGE_USER_KURDISH_TURKEY))
398 nScript = css::i18n::ScriptType::LATIN;
400 // CJK catcher
401 else if ( primary(nLang).anyOf(
402 primary(LANGUAGE_CHINESE ),
403 primary(LANGUAGE_YUE_CHINESE_HONGKONG ),
404 primary(LANGUAGE_JAPANESE ),
405 primary(LANGUAGE_KOREAN )
408 nScript = css::i18n::ScriptType::ASIAN;
410 // CTL catcher
411 else if (primary(nLang).anyOf(
412 primary(LANGUAGE_AMHARIC_ETHIOPIA ),
413 primary(LANGUAGE_ARABIC_SAUDI_ARABIA ),
414 primary(LANGUAGE_ASSAMESE ),
415 primary(LANGUAGE_BENGALI ),
416 primary(LANGUAGE_BURMESE ),
417 primary(LANGUAGE_DHIVEHI ),
418 primary(LANGUAGE_FARSI ),
419 primary(LANGUAGE_GUJARATI ),
420 primary(LANGUAGE_HEBREW ),
421 primary(LANGUAGE_HINDI ),
422 primary(LANGUAGE_KANNADA ),
423 primary(LANGUAGE_KASHMIRI ),
424 primary(LANGUAGE_KHMER ),
425 primary(LANGUAGE_KONKANI ),
426 primary(LANGUAGE_LAO ),
427 primary(LANGUAGE_MALAYALAM ),
428 primary(LANGUAGE_MANIPURI ),
429 primary(LANGUAGE_MARATHI ),
430 primary(LANGUAGE_NEPALI ),
431 primary(LANGUAGE_ODIA ),
432 primary(LANGUAGE_PUNJABI ),
433 primary(LANGUAGE_SANSKRIT ),
434 primary(LANGUAGE_SINDHI ),
435 primary(LANGUAGE_SINHALESE_SRI_LANKA ),
436 primary(LANGUAGE_SYRIAC ),
437 primary(LANGUAGE_TAMIL ),
438 primary(LANGUAGE_TELUGU ),
439 primary(LANGUAGE_THAI ),
440 primary(LANGUAGE_TIBETAN ), // also LANGUAGE_DZONGKHA
441 primary(LANGUAGE_TIGRIGNA_ETHIOPIA ),
442 primary(LANGUAGE_UIGHUR_CHINA ),
443 primary(LANGUAGE_URDU_INDIA ),
444 primary(LANGUAGE_USER_BODO_INDIA ),
445 primary(LANGUAGE_USER_DOGRI_INDIA ),
446 primary(LANGUAGE_USER_LIMBU ),
447 primary(LANGUAGE_USER_MAITHILI_INDIA ),
448 primary(LANGUAGE_USER_NKO ),
449 primary(LANGUAGE_USER_SARAIKI ),
450 primary(LANGUAGE_YIDDISH )))
452 nScript = css::i18n::ScriptType::COMPLEX;
454 // Western (actually not necessarily Latin but also Cyrillic,
455 // for example)
456 else if (LanguageTag::isOnTheFlyID(nLang))
458 switch (LanguageTag::getOnTheFlyScriptType(nLang))
460 case LanguageTag::ScriptType::CJK :
461 nScript = css::i18n::ScriptType::ASIAN;
462 break;
463 case LanguageTag::ScriptType::CTL :
464 case LanguageTag::ScriptType::RTL :
465 nScript = css::i18n::ScriptType::COMPLEX;
466 break;
467 case LanguageTag::ScriptType::WESTERN :
468 case LanguageTag::ScriptType::UNKNOWN :
469 default:
470 nScript = css::i18n::ScriptType::LATIN;
471 break;
474 else
476 nScript = css::i18n::ScriptType::LATIN;
478 return nScript;
482 // static
483 bool MsLangId::isNonLatinWestern( LanguageType nLang )
485 if (nLang.anyOf(
486 LANGUAGE_AZERI_CYRILLIC,
487 LANGUAGE_AZERI_CYRILLIC_LSO,
488 LANGUAGE_BELARUSIAN,
489 LANGUAGE_BOSNIAN_CYRILLIC_BOSNIA_HERZEGOVINA,
490 LANGUAGE_BOSNIAN_CYRILLIC_LSO,
491 LANGUAGE_BULGARIAN,
492 LANGUAGE_GREEK,
493 LANGUAGE_MONGOLIAN_CYRILLIC_LSO,
494 LANGUAGE_MONGOLIAN_CYRILLIC_MONGOLIA,
495 LANGUAGE_RUSSIAN,
496 LANGUAGE_RUSSIAN_MOLDOVA,
497 LANGUAGE_SERBIAN_CYRILLIC_BOSNIA_HERZEGOVINA,
498 LANGUAGE_SERBIAN_CYRILLIC_LSO,
499 LANGUAGE_SERBIAN_CYRILLIC_MONTENEGRO,
500 LANGUAGE_SERBIAN_CYRILLIC_SAM,
501 LANGUAGE_SERBIAN_CYRILLIC_SERBIA,
502 LANGUAGE_UKRAINIAN,
503 LANGUAGE_UZBEK_CYRILLIC,
504 LANGUAGE_UZBEK_CYRILLIC_LSO))
506 return true;
508 if (getScriptType( nLang) != css::i18n::ScriptType::LATIN)
509 return false;
510 LanguageTag aLanguageTag( nLang);
511 if (aLanguageTag.hasScript())
512 return aLanguageTag.getScript() != "Latn";
513 return false;
517 // static
518 bool MsLangId::isLegacy( LanguageType nLang )
520 return nLang.anyOf(
521 LANGUAGE_SERBIAN_CYRILLIC_SAM,
522 LANGUAGE_SERBIAN_LATIN_SAM);
523 /* TODO: activate once dictionary was renamed from pap-AN to
524 * pap-CW, or the pap-CW one supports also pap-AN, see fdo#44112 */
525 //case LANGUAGE_PAPIAMENTU:
529 // static
530 LanguageType MsLangId::getReplacementForObsoleteLanguage( LanguageType nLang )
532 if (nLang == LANGUAGE_OBSOLETE_USER_LATIN)
533 nLang = LANGUAGE_LATIN;
534 else if (nLang == LANGUAGE_OBSOLETE_USER_LATIN_VATICAN)
535 nLang = LANGUAGE_LATIN;
536 else if (nLang == LANGUAGE_OBSOLETE_USER_MAORI)
537 nLang = LANGUAGE_MAORI_NEW_ZEALAND;
538 else if (nLang == LANGUAGE_OBSOLETE_USER_KINYARWANDA)
539 nLang = LANGUAGE_KINYARWANDA_RWANDA;
540 else if (nLang == LANGUAGE_OBSOLETE_USER_UPPER_SORBIAN)
541 nLang = LANGUAGE_UPPER_SORBIAN_GERMANY;
542 else if (nLang == LANGUAGE_OBSOLETE_USER_LOWER_SORBIAN)
543 nLang = LANGUAGE_LOWER_SORBIAN_GERMANY;
544 else if (nLang == LANGUAGE_OBSOLETE_USER_OCCITAN)
545 nLang = LANGUAGE_OCCITAN_FRANCE;
546 else if (nLang == LANGUAGE_OBSOLETE_USER_BRETON)
547 nLang = LANGUAGE_BRETON_FRANCE;
548 else if (nLang == LANGUAGE_OBSOLETE_USER_KALAALLISUT)
549 nLang = LANGUAGE_KALAALLISUT_GREENLAND;
550 else if (nLang == LANGUAGE_OBSOLETE_USER_LUXEMBOURGISH)
551 nLang = LANGUAGE_LUXEMBOURGISH_LUXEMBOURG;
552 else if (nLang == LANGUAGE_OBSOLETE_USER_KABYLE)
553 nLang = LANGUAGE_TAMAZIGHT_LATIN_ALGERIA;
554 else if (nLang == LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN)
555 nLang = LANGUAGE_CATALAN_VALENCIAN;
556 else if (nLang == LANGUAGE_OBSOLETE_USER_MALAGASY_PLATEAU)
557 nLang = LANGUAGE_MALAGASY_PLATEAU;
558 else if (nLang == LANGUAGE_GAELIC_SCOTLAND_LEGACY)
559 nLang = LANGUAGE_GAELIC_SCOTLAND;
560 else if (nLang == LANGUAGE_OBSOLETE_USER_TSWANA_BOTSWANA)
561 nLang = LANGUAGE_TSWANA_BOTSWANA;
562 else if (nLang == LANGUAGE_OBSOLETE_USER_SERBIAN_LATIN_SERBIA)
563 nLang = LANGUAGE_SERBIAN_LATIN_SERBIA;
564 else if (nLang == LANGUAGE_OBSOLETE_USER_SERBIAN_LATIN_MONTENEGRO)
565 nLang = LANGUAGE_SERBIAN_LATIN_MONTENEGRO;
566 else if (nLang == LANGUAGE_OBSOLETE_USER_SERBIAN_CYRILLIC_SERBIA)
567 nLang = LANGUAGE_SERBIAN_CYRILLIC_SERBIA;
568 else if (nLang == LANGUAGE_OBSOLETE_USER_SERBIAN_CYRILLIC_MONTENEGRO)
569 nLang = LANGUAGE_SERBIAN_CYRILLIC_MONTENEGRO;
570 else if (nLang == LANGUAGE_OBSOLETE_USER_KURDISH_IRAQ)
571 nLang = LANGUAGE_KURDISH_ARABIC_IRAQ;
572 else if (nLang == LANGUAGE_OBSOLETE_USER_SPANISH_CUBA)
573 nLang = LANGUAGE_SPANISH_CUBA;
574 else if (nLang == LANGUAGE_OBSOLETE_USER_SPANISH_LATIN_AMERICA)
575 nLang = LANGUAGE_SPANISH_LATIN_AMERICA;
577 // The following are not strictly obsolete but should be mapped to a
578 // replacement locale when encountered.
580 // no_NO is an alias for nb_NO
581 else if (nLang == LANGUAGE_NORWEGIAN)
582 nLang = LANGUAGE_NORWEGIAN_BOKMAL;
584 // The erroneous Tibetan vs. Dzongkha case, #i53497#
585 // We (and MS) have stored LANGUAGE_TIBETAN_BHUTAN. This will need
586 // special attention if MS one day decides to actually use
587 // LANGUAGE_TIBETAN_BHUTAN for bo-BT instead of having it reserved;
588 // then remove the mapping and hope every dz-BT user used ODF to store
589 // documents ;-)
590 else if (nLang == LANGUAGE_TIBETAN_BHUTAN)
591 nLang = LANGUAGE_DZONGKHA_BHUTAN;
593 // en-GB-oed is deprecated, use en-GB-oxendict instead.
594 else if (nLang == LANGUAGE_USER_ENGLISH_UK_OED)
595 nLang = LANGUAGE_USER_ENGLISH_UK_OXENDICT;
596 return nLang;
599 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */