20#ifndef INCLUDED_I18NLANGTAG_MSLANGID_HXX
21#define INCLUDED_I18NLANGTAG_MSLANGID_HXX
27#include <com/sun/star/lang/Locale.hpp>
46 return LanguageType((sal_uInt16(nSubLangId) << 10) | sal_uInt16(nPriLangId));
118 static css::lang::Locale getFallbackLocale(
const css::lang::Locale & rLocale );
124 static LanguageType convertUnxByteStringToLanguage( std::string_view rString );
155 static bool isSimplifiedChinese(
const css::lang::Locale & rLocale );
158 static bool isTraditionalChinese(
const css::lang::Locale & rLocale );
168 static bool hasForbiddenCharacters(
LanguageType nLang );
172 static bool needsSequenceChecking(
LanguageType nLang );
198 static void setConfiguredSystemUILanguage(
LanguageType nLang );
199 static void setConfiguredWesternFallback(
LanguageType nLang );
200 static void setConfiguredComplexFallback(
LanguageType nLang );
201 static void setConfiguredAsianFallback(
LanguageType nLang );
232 static ::std::vector< LanguagetagMapping > getDefinedLanguagetags();
246 const css::lang::Locale & rLocale );
249 std::string_view rString );
256 const css::lang::Locale & rLocale );
260 const css::lang::Locale & rLocale );
264 std::u16string_view rPriv );
268 const css::lang::Locale & rLocale );
272 const OUString& rLang,
const OUString& rCountry,
bool bSkipIsoTable );
277 std::string_view rLang, std::string_view rCountry );
313 LanguageType nLang, css::lang::Locale & rLocale,
bool bIgnoreOverride );
317 const css::lang::Locale & rLocale );
Wrapper for liblangtag BCP 47 language tags, MS-LangIDs, locales and conversions in between.
static void setConfiguredSystemLanguage(LanguageType nLang)
@ATTENTION: ONLY to be called by the application's configuration!
Encapsulated conversion methods used by LanguageTag and conversions, not to be used by anything else.
Encapsulated methods that shall only be accessed through class LanguageTag.
Methods related to Microsoft language IDs.
static LanguageType getPrimaryLanguage(LanguageType nLangID)
Get the primary language of a LangID.
static css::lang::Locale getFallbackLocale(const css::lang::Locale &rLocale)
Get fall-back Locale for Locale with handling of an empty language name designating the SYSTEM langua...
static LanguageType nConfiguredSystemUILanguage
static LanguageType nConfiguredComplexFallback
static LanguageType nConfiguredWesternFallback
static LanguageType getSubLanguage(LanguageType nLangID)
Get the sublanguage of a LangID.
static LanguageType nConfiguredSystemLanguage
static LanguageType convertUnxByteStringToLanguage(std::string_view rString)
static LanguageType nConfiguredAsianFallback
static LanguageType makeLangID(LanguageType nSubLangId, LanguageType nPriLangId)
Create a LangID from a primary and a sublanguage.
#define I18NLANGTAG_DLLPUBLIC
#define I18NLANGTAG_DLLPRIVATE
o3tl::strong_int< sal_uInt16, struct LanguageTypeTag > LanguageType
These are MS LANGIDs, the lower 10 bits (mask 0x03ff, values below 0x0400 aren't real locale IDs) rep...
#define LANGUAGE_MASK_PRIMARY
const LanguageTag & getLocale()
LanguagetagMapping(OUString aBcp47, LanguageType nLang)