diff options
Diffstat (limited to 'i18npool/source/isolang/mslangid.cxx')
-rw-r--r-- | i18npool/source/isolang/mslangid.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx index 6afde6252c34..12cf5a3ad1da 100644 --- a/i18npool/source/isolang/mslangid.cxx +++ b/i18npool/source/isolang/mslangid.cxx @@ -149,8 +149,8 @@ void MsLangId::Conversion::convertLanguageToLocale( LanguageType nLang, rLocale.Variant = OUString(); convertLanguageToIsoNames( nLang, rLocale.Language, rLocale.Country); /* FIXME: this x-... is temporary until conversion will be moved up to - * LanguageTag */ - if (rLocale.Language.startsWith( "x-")) + * LanguageTag. Also handle the nasty "*" joker as privateuse. */ + if (rLocale.Language.startsWith( "x-") || (rLocale.Language == "*")) { rLocale.Variant = rLocale.Language; rLocale.Language = "qlt"; @@ -186,8 +186,9 @@ LanguageType MsLangId::Conversion::convertLocaleToLanguage( return LANGUAGE_SYSTEM; /* FIXME: this x-... is temporary until conversion will be moved up to - * LanguageTag */ - LanguageType nRet = ((!rLocale.Variant.isEmpty() && rLocale.Variant.startsWithIgnoreAsciiCase( "x-")) ? + * LanguageTag. Also handle the nasty "*" joker as privateuse. */ + LanguageType nRet = ((!rLocale.Variant.isEmpty() && + (rLocale.Variant.startsWithIgnoreAsciiCase( "x-") || (rLocale.Variant == "*"))) ? convertPrivateUseToLanguage( rLocale.Variant) : convertIsoNamesToLanguage( rLocale.Language, rLocale.Country)); if (nRet == LANGUAGE_DONTKNOW) |