From 4806df614a0e7e499aef3d10f77923f189207205 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Wed, 24 Apr 2013 23:42:47 +0200 Subject: added LanguageTagIcu::getIcuLocale() with additional variant Change-Id: I5a5689f449ac7653bb716f2ce67ea1039fe2559c --- include/i18nlangtag/languagetagicu.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/i18nlangtag') diff --git a/include/i18nlangtag/languagetagicu.hxx b/include/i18nlangtag/languagetagicu.hxx index 20e5349f7875..2fc9db323fe3 100644 --- a/include/i18nlangtag/languagetagicu.hxx +++ b/include/i18nlangtag/languagetagicu.hxx @@ -12,6 +12,7 @@ #include #include +#include #include class LanguageTag; @@ -37,6 +38,17 @@ public: Always resolves an empty tag to the system locale. */ static icu::Locale getIcuLocale( const LanguageTag & rLanguageTag ); + + /** Obtain language tag as ICU icu::Locale, adding variant data. + + From the LanguageTag only language and country are used to construct + the icu:Locale, the variant field is copied from rVariant. For example + needed to create an icu::Collator instance where the variant field + denotes the algorithm to be used. + + Always resolves an empty tag to the system locale. + */ + static icu::Locale getIcuLocale( const LanguageTag & rLanguageTag, const OUString & rVariant ); }; #endif // INCLUDED_I18NLANGTAG_LANGUAGETAGICU_HXX -- cgit