diff options
Diffstat (limited to 'i18npool/source/languagetag/languagetag.cxx')
-rw-r--r-- | i18npool/source/languagetag/languagetag.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/i18npool/source/languagetag/languagetag.cxx b/i18npool/source/languagetag/languagetag.cxx index 3e655ee87bb3..f863ae2ca7b1 100644 --- a/i18npool/source/languagetag/languagetag.cxx +++ b/i18npool/source/languagetag/languagetag.cxx @@ -618,6 +618,20 @@ LanguageType LanguageTag::getLanguageType( bool bResolveSystem ) const } +void LanguageTag::getIsoLanguageCountry( rtl::OUString& rLanguage, rtl::OUString& rCountry ) const +{ + if (!isIsoLocale()) + { + rLanguage = OUString(); + rCountry = OUString(); + return; + } + // After isIsoLocale() it's safe to call getLanguage() for ISO code. + rLanguage = getLanguage(); + rCountry = getCountry(); +} + + namespace { |