Bump version to 6.4-15
[LibreOffice.git] / include / i18nlangtag / languagetagicu.hxx
blobe2c9f7ce2b0e29b89f955daf354019d32481255d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #ifndef INCLUDED_I18NLANGTAG_LANGUAGETAGICU_HXX
11 #define INCLUDED_I18NLANGTAG_LANGUAGETAGICU_HXX
13 #include <sal/config.h>
14 #include <i18nlangtag/i18nlangtagdllapi.h>
15 #include <rtl/ustring.hxx>
16 #include <unicode/locid.h>
18 class LanguageTag;
21 /** Interface LanguageTag to ICU's icu::Locale
23 Separated from LanguageTag to not pollute the entire code base (and thus
24 makefiles) with ICU header file inclusion, only the few code actually using
25 this needs to know about ICU, which it did anyway.
27 class SAL_WARN_UNUSED I18NLANGTAG_DLLPUBLIC LanguageTagIcu
29 public:
31 /** Obtain language tag as ICU icu::Locale.
33 If the language tag is a "pure" ISO locale (see
34 LanguageTag::getLocale()) that is directly constructed, otherwise it is
35 converted using the available ICU mechanisms.
37 Always resolves an empty tag to the system locale.
39 static icu::Locale getIcuLocale( const LanguageTag & rLanguageTag );
41 /** Obtain language tag as ICU icu::Locale, adding variant data.
43 From the LanguageTag only language and country are used to construct
44 the icu:Locale, the variant field is copied from rVariant.
45 The 4th arg of icu::Locale "keywords" (eg: for collation)
47 Always resolves an empty tag to the system locale.
49 static icu::Locale getIcuLocale( const LanguageTag & rLanguageTag, const OUString & rVariant, const OUString & rKeywords);
52 #endif // INCLUDED_I18NLANGTAG_LANGUAGETAGICU_HXX
54 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */