summaryrefslogtreecommitdiffstats
path: root/i18nlangtag/source/languagetag/languagetag.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'i18nlangtag/source/languagetag/languagetag.cxx')
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 7d0359702860..ee4a1425cd7f 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -126,6 +126,17 @@ static LanguageType getNextOnTheFlyLanguage()
}
+// static
+bool LanguageTag::isOnTheFlyID( LanguageType nLang )
+{
+ LanguageType nPri = MsLangId::getPrimaryLanguage( nLang);
+ LanguageType nSub = MsLangId::getSubLanguage( nLang);
+ return
+ LANGUAGE_ON_THE_FLY_START <= nPri && nPri <= LANGUAGE_ON_THE_FLY_END &&
+ LANGUAGE_ON_THE_FLY_SUB_START <= nSub && nSub <= LANGUAGE_ON_THE_FLY_SUB_END;
+}
+
+
/** A reference holder for liblangtag data de/initialization, one static
instance. Currently implemented such that the first "ref" inits and dtor
(our library deinitialized) tears down.