From b641e39d0aa9356717018e94925485d4755f8bbb Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 3 Sep 2013 18:50:40 +0200 Subject: added convertToLanguageTypeWithFallback() Change-Id: Ib57a7c6fc57192b4a615f5ad0e43c580769513e9 --- include/i18nlangtag/languagetag.hxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx index d87c5e3f7821..946b459ffd44 100644 --- a/include/i18nlangtag/languagetag.hxx +++ b/include/i18nlangtag/languagetag.hxx @@ -435,6 +435,19 @@ public: */ static LanguageType convertToLanguageType( const OUString& rBcp47, bool bResolveSystem = true ); + /** Convert BCP 47 string to MS-LangID with fallback, convenience method. + + NOTE: exists only for consistency with the other convertTo...() + methods, internally uses a temporary LanguageTag instance for + conversion so does not save anything compared to + LanguageTag(rBcp47).makeFallback().getLanguageType(bResolveSystem). + + @see makeFallback() + + Always resolves an empty tag to the system locale. + */ + static LanguageType convertToLanguageTypeWithFallback( const OUString& rBcp47 ); + private: enum Decision -- cgit