Inflection
Morphology Inflection
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
inflection::util::LocaleUtils Class Referencefinal

Provides utility functions for use with ULocale objects. More...

#include <LocaleUtils.hpp>

Public Member Functions

static ::std::vector<::inflection::util::ULocaletoLocales (const ::std::u16string &localesString)
 
static ::std::set<::inflection::util::ULocale, std::less<> > getSupportedLocaleList ()
 
static ::std::map<::std::string, ::std::vector<::inflection::util::ULocale >, std::less<> > getSupportedLocaleMap ()
 
static ::std::pair<::inflection::util::ULocale, ::inflection::util::ULocalegetFallbackPair (const ::inflection::util::ULocale &locale)
 

Static Public Member Functions

::inflection::util::ULocale toLocale (const ::std::u16string &localeString)
 
::std::u16string toString (const ::inflection::util::ULocale &locale, const ::std::u16string &separator)
 
::std::u16string toString (const ::inflection::util::ULocale &locale)
 
::inflection::util::ULocale createValidRegionAwareLanguage (const ::inflection::util::ULocale &language, const ::inflection::util::ULocale &region)
 
static bool areLanguageScriptCompatible (const ::inflection::util::ULocale &locale1, const ::inflection::util::ULocale &locale2)
 
static const ::inflection::util::ULocaleARABIC ()
 
static const ::inflection::util::ULocaleSAUDI_ARABIA ()
 
static const ::inflection::util::ULocaleBULGARIAN ()
 
static const ::inflection::util::ULocaleBULGARIA ()
 
static const ::inflection::util::ULocaleCATALAN ()
 
static const ::inflection::util::ULocaleSPAIN_CATALAN ()
 
static const ::inflection::util::ULocaleCZECH ()
 
static const ::inflection::util::ULocaleCZECHIA ()
 
static const ::inflection::util::ULocaleDANISH ()
 
static const ::inflection::util::ULocaleDENMARK ()
 
static const ::inflection::util::ULocaleGERMAN ()
 
static const ::inflection::util::ULocaleGERMANY ()
 
static const ::inflection::util::ULocaleSWITZERLAND_GERMAN ()
 
static const ::inflection::util::ULocaleAUSTRIA ()
 
static const ::inflection::util::ULocaleGREEK ()
 
static const ::inflection::util::ULocaleGREECE ()
 
static const ::inflection::util::ULocaleENGLISH ()
 
static const ::inflection::util::ULocaleUS ()
 
static const ::inflection::util::ULocaleAUSTRALIA_ENGLISH ()
 
static const ::inflection::util::ULocaleCANADIAN_ENGLISH ()
 
static const ::inflection::util::ULocaleSINGAPOREAN_ENGLISH ()
 
static const ::inflection::util::ULocaleGREAT_BRITAIN ()
 
static const ::inflection::util::ULocaleNEW_ZEALAND_ENGLISH ()
 
static const ::inflection::util::ULocaleINDIAN_ENGLISH ()
 
static const ::inflection::util::ULocaleSOUTH_AFRICAN_ENGLISH ()
 
static const ::inflection::util::ULocaleIRISH_ENGLISH ()
 
static const ::inflection::util::ULocaleSPANISH ()
 
static const ::inflection::util::ULocaleSPAIN_SPANISH ()
 
static const ::inflection::util::ULocaleMEXICO_SPANISH ()
 
static const ::inflection::util::ULocaleUS_SPANISH ()
 
static const ::inflection::util::ULocaleCHILEAN_SPANISH ()
 
static const ::inflection::util::ULocaleESTONIAN ()
 
static const ::inflection::util::ULocaleESTONIA ()
 
static const ::inflection::util::ULocaleFINNISH ()
 
static const ::inflection::util::ULocaleFINLAND ()
 
static const ::inflection::util::ULocaleFRENCH ()
 
static const ::inflection::util::ULocaleFRANCE ()
 
static const ::inflection::util::ULocaleBELGIUM_FRENCH ()
 
static const ::inflection::util::ULocaleSWITZERLAND_FRENCH ()
 
static const ::inflection::util::ULocaleCANADIAN_FRENCH ()
 
static const ::inflection::util::ULocaleHEBREW ()
 
static const ::inflection::util::ULocaleISRAEL ()
 
static const ::inflection::util::ULocaleHINDI ()
 
static const ::inflection::util::ULocaleINDIA_HINDI ()
 
static const ::inflection::util::ULocaleCROATIAN ()
 
static const ::inflection::util::ULocaleCROATIA ()
 
static const ::inflection::util::ULocaleHUNGARIAN ()
 
static const ::inflection::util::ULocaleHUNGARY ()
 
static const ::inflection::util::ULocaleINDONESIAN ()
 
static const ::inflection::util::ULocaleINDONESIA ()
 
static const ::inflection::util::ULocaleICELANDIC ()
 
static const ::inflection::util::ULocaleICELAND ()
 
static const ::inflection::util::ULocaleITALIAN ()
 
static const ::inflection::util::ULocaleITALY ()
 
static const ::inflection::util::ULocaleSWITZERLAND_ITALIAN ()
 
static const ::inflection::util::ULocaleJAPANESE ()
 
static const ::inflection::util::ULocaleJAPAN ()
 
static const ::inflection::util::ULocaleKAZAKH ()
 
static const ::inflection::util::ULocaleKAZAKHSTAN ()
 
static const ::inflection::util::ULocaleKOREAN ()
 
static const ::inflection::util::ULocaleKOREA ()
 
static const ::inflection::util::ULocaleLITHUANIAN ()
 
static const ::inflection::util::ULocaleLITHUANIA ()
 
static const ::inflection::util::ULocaleMALAY ()
 
static const ::inflection::util::ULocaleMALAYSIA ()
 
static const ::inflection::util::ULocaleNORWEGIAN ()
 
static const ::inflection::util::ULocaleNORWAY ()
 
static const ::inflection::util::ULocaleDUTCH ()
 
static const ::inflection::util::ULocaleNETHERLANDS ()
 
static const ::inflection::util::ULocaleBELGIUM_DUTCH ()
 
static const ::inflection::util::ULocalePOLISH ()
 
static const ::inflection::util::ULocalePOLAND ()
 
static const ::inflection::util::ULocalePORTUGUESE ()
 
static const ::inflection::util::ULocalePORTUGAL ()
 
static const ::inflection::util::ULocaleBRAZIL ()
 
static const ::inflection::util::ULocaleROMANIAN ()
 
static const ::inflection::util::ULocaleROMANIA ()
 
static const ::inflection::util::ULocaleRUSSIAN ()
 
static const ::inflection::util::ULocaleRUSSIA ()
 
static const ::inflection::util::ULocaleSLOVAK ()
 
static const ::inflection::util::ULocaleSLOVAKIA ()
 
static const ::inflection::util::ULocaleSERBIAN ()
 
static const ::inflection::util::ULocaleSERBIA ()
 
static const ::inflection::util::ULocaleSWEDISH ()
 
static const ::inflection::util::ULocaleSWEDEN ()
 
static const ::inflection::util::ULocaleTHAI ()
 
static const ::inflection::util::ULocaleTHAILAND ()
 
static const ::inflection::util::ULocaleTURKISH ()
 
static const ::inflection::util::ULocaleTURKEY ()
 
static const ::inflection::util::ULocaleUKRAINIAN ()
 
static const ::inflection::util::ULocaleUKRAINE ()
 
static const ::inflection::util::ULocaleVIETNAMESE ()
 
static const ::inflection::util::ULocaleVIETNAM ()
 
static const ::inflection::util::ULocaleSHANGHAINESE ()
 
static const ::inflection::util::ULocaleCHINA_SHANGHAINESE ()
 
static const ::inflection::util::ULocaleCANTONESE ()
 
static const ::inflection::util::ULocaleCHINA_CANTONESE ()
 
static const ::inflection::util::ULocaleHONGKONG_CANTONESE ()
 
static const ::inflection::util::ULocaleCHINESE ()
 
static const ::inflection::util::ULocaleSIMPLIFIED_CHINESE ()
 
static const ::inflection::util::ULocaleTRADITIONAL_CHINESE ()
 
static const ::inflection::util::ULocaleHONGKONG_CHINESE ()
 
static const ::inflection::util::ULocaleCHINA ()
 
static const ::inflection::util::ULocaleTAIWAN ()
 
static const ::inflection::util::ULocaleROOT ()
 

Detailed Description

Provides utility functions for use with ULocale objects.

This class contains many static functions that are very useful for manipulation, combination, accessing, and validation of ULocale objects.

This class also has functions for getting an instance of ULocale for all of Inflection's supported locales, as well as a list of all currently supported locales (getSupportedLocaleList()).

Definition at line 21 of file LocaleUtils.hpp.

Member Function Documentation

◆ ARABIC()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ARABIC ( )
static

ar: Arabic

◆ areLanguageScriptCompatible()

static bool inflection::util::LocaleUtils::areLanguageScriptCompatible ( const ::inflection::util::ULocale locale1,
const ::inflection::util::ULocale locale2 
)
static

Returns True if the two locales have a compatible script (written form) and language (spoken form).

Parameters
locale1The first locale to compare.
locale2The second locale to compare.
Returns
True if the two locales have a compatible script and language.

◆ AUSTRALIA_ENGLISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::AUSTRALIA_ENGLISH ( )
static

en_AU: English (Australia)

◆ AUSTRIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::AUSTRIA ( )
static

de_AT: German (Austria)

◆ BELGIUM_DUTCH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::BELGIUM_DUTCH ( )
static

nl_BE: Dutch (Belgium)

◆ BELGIUM_FRENCH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::BELGIUM_FRENCH ( )
static

fr_BE: French (Belgium)

◆ BRAZIL()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::BRAZIL ( )
static

pt_BR: Portuguese (Brazil)

◆ BULGARIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::BULGARIA ( )
static

bg_BG: Bulgarian (Bulgaria)

◆ BULGARIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::BULGARIAN ( )
static

bg: Bulgarian

◆ CANADIAN_ENGLISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CANADIAN_ENGLISH ( )
static

en_CA: English (Canada)

◆ CANADIAN_FRENCH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CANADIAN_FRENCH ( )
static

fr_CA: French (Canada)

◆ CANTONESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CANTONESE ( )
static

yue: Cantonese

◆ CATALAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CATALAN ( )
static

ca: Catalan

◆ CHILEAN_SPANISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CHILEAN_SPANISH ( )
static

es_CL: Spanish (Chile)

◆ CHINA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CHINA ( )
static

zh_CN: Chinese (China) This represents the Chinese macro-language in China. By default, it represents Simplified Mandarin in China.

◆ CHINA_CANTONESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CHINA_CANTONESE ( )
static

yue_CN: Cantonese (China) This represents the Cantonese written in the simplified Han script in China.

◆ CHINA_SHANGHAINESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CHINA_SHANGHAINESE ( )
static

wuu_CN: Shanghainese (China)

◆ CHINESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CHINESE ( )
static

zh: Chinese This represents the Chinese macro-language. By default, it represents Simplified Mandarin in China.

◆ createValidRegionAwareLanguage()

::inflection::util::ULocale inflection::util::LocaleUtils::createValidRegionAwareLanguage ( const ::inflection::util::ULocale language,
const ::inflection::util::ULocale region 
)
static

This allows you to have behavior that is close to the spoken language, without forcing an unsupported language variant from being too strictly the region based language. If your iOS language is en_US, but your spoken language is ar_SA, just return ar_SA because ar_US is not valid in CLDR. If your iOS language is ar_TN, but your spoken language is ar_SA, return ar_TN because it's valid in CLDR and ICU. For example, ar_TN uses 0-9 for the digits, but ar_SA uses ٠-٩ for the digits. If your iOS language is es_MX, but your spoken language is es_CO, return es_MX because it's valid in CLDR and ICU. For example, es_MX uses "." for the decimal point, but es_CO uses "," for the decimal point.

Parameters
languageThe spoken language setting
regionThe region setting from the device, which includes the iOS language
Returns
A hybrid locale

◆ CROATIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CROATIA ( )
static

hr_HR: Croatian (Croatia)

◆ CROATIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CROATIAN ( )
static

hr: Croatian

◆ CZECH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CZECH ( )
static

cs: Czech

◆ CZECHIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::CZECHIA ( )
static

cs: Czech (Czechia or Czech Republic)

◆ DANISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::DANISH ( )
static

da: Danish

◆ DENMARK()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::DENMARK ( )
static

da_DK: Danish (Denmark)

◆ DUTCH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::DUTCH ( )
static

nl: Dutch

◆ ENGLISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ENGLISH ( )
static

en: English

◆ ESTONIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ESTONIA ( )
static

et_EE: Estonian (Estonia)

◆ ESTONIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ESTONIAN ( )
static

et: Estonian

◆ FINLAND()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::FINLAND ( )
static

fi_FI: Finnish (Finland)

◆ FINNISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::FINNISH ( )
static

fi: Finnish

◆ FRANCE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::FRANCE ( )
static

fr_FR: French (France)

◆ FRENCH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::FRENCH ( )
static

fr: French

◆ GERMAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::GERMAN ( )
static

de: German

◆ GERMANY()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::GERMANY ( )
static

de_DE: German (Germany)

◆ getFallbackPair()

static ::std::pair<::inflection::util::ULocale, ::inflection::util::ULocale > inflection::util::LocaleUtils::getFallbackPair ( const ::inflection::util::ULocale locale)

Attempts to fallback to a region specific locale when the region-specific locale is shifted to a region-less locale. This is currently used to get fallbacks for Chinese dialects.

Parameters
localeThe region-less locale to find a fallback for.
Returns
The fallback locale pair.

◆ getSupportedLocaleList()

static ::std::set<::inflection::util::ULocale, std::less<> > inflection::util::LocaleUtils::getSupportedLocaleList ( )

Returns the list of supported locales in Inflection as a std::set<ULocale>.

Returns
The list of supported locales in Inflection.

◆ getSupportedLocaleMap()

static ::std::map<::std::string, ::std::vector<::inflection::util::ULocale >, std::less<> > inflection::util::LocaleUtils::getSupportedLocaleMap ( )

Returns a map of the supported locales in Inflection, mapping the language string in the configuration file to the ULocale object it represents.

Returns
The map of supported locales in Inflection.

◆ GREAT_BRITAIN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::GREAT_BRITAIN ( )
static

en_GB: English (United Kingdom) It's worth noting that the United Kingdom includes Great Britain and Northern Ireland.

◆ GREECE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::GREECE ( )
static

el_GR: Greek (Greece)

◆ GREEK()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::GREEK ( )
static

el: Greek

◆ HEBREW()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::HEBREW ( )
static

he: Hebrew

◆ HINDI()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::HINDI ( )
static

hi: Hindi

◆ HONGKONG_CANTONESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::HONGKONG_CANTONESE ( )
static

yue_HK: Cantonese (Hong Kong) This represents the Cantonese written in the traditional Han script in Hong Kong.

◆ HONGKONG_CHINESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::HONGKONG_CHINESE ( )
static

zh_HK: Chinese (Hong Kong) This represents the Chinese macro-language written in the traditional Han script in Hong Kong. By default, it represents Traditional Cantonese.

◆ HUNGARIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::HUNGARIAN ( )
static

hu: Hungarian

◆ HUNGARY()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::HUNGARY ( )
static

hu_HU: Hungarian (Hungary)

◆ ICELAND()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ICELAND ( )
static

is_IS: Icelandic (Iceland)

◆ ICELANDIC()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ICELANDIC ( )
static

is: Icelandic

◆ INDIA_HINDI()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::INDIA_HINDI ( )
static

hi_IN: Hindi (India)

◆ INDIAN_ENGLISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::INDIAN_ENGLISH ( )
static

en_IN: English (India)

◆ INDONESIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::INDONESIA ( )
static

id_ID: Indonesian (Indonesia)

◆ INDONESIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::INDONESIAN ( )
static

id: Indonesian

◆ IRISH_ENGLISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::IRISH_ENGLISH ( )
static

en_IE: English (Ireland)

◆ ISRAEL()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ISRAEL ( )
static

he_IL: Hebrew (Israel)

◆ ITALIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ITALIAN ( )
static

it: Italian

◆ ITALY()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ITALY ( )
static

it_IT: Italian (Italy)

◆ JAPAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::JAPAN ( )
static

ja_JP: Japanese (Japan)

◆ JAPANESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::JAPANESE ( )
static

ja: Japanese

◆ KAZAKH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::KAZAKH ( )
static

kk: Kazakh

◆ KAZAKHSTAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::KAZAKHSTAN ( )
static

kk_KZ: Kazakh (Kazakhstan)

◆ KOREA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::KOREA ( )
static

ko_KR: Korean (South Korea)

◆ KOREAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::KOREAN ( )
static

ko: Korean

◆ LITHUANIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::LITHUANIA ( )
static

lt_LT: Lithuanian (Lithuania)

◆ LITHUANIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::LITHUANIAN ( )
static

lt: Lithuanian

◆ MALAY()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::MALAY ( )
static

ms: Malay

◆ MALAYSIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::MALAYSIA ( )
static

ms_MY: Malay (Malaysia)

◆ MEXICO_SPANISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::MEXICO_SPANISH ( )
static

es_MX: Spanish (Mexico)

◆ NETHERLANDS()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::NETHERLANDS ( )
static

nl_NL: Dutch (Netherlands)

◆ NEW_ZEALAND_ENGLISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::NEW_ZEALAND_ENGLISH ( )
static

en_NZ: English (New Zealand)

◆ NORWAY()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::NORWAY ( )
static

nb_NO: Norwegian Bokmål (Norway)

◆ NORWEGIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::NORWEGIAN ( )
static

nb: Norwegian Bokmål

◆ POLAND()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::POLAND ( )
static

pl_PL: Polish (Poland)

◆ POLISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::POLISH ( )
static

pl: Polish

◆ PORTUGAL()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::PORTUGAL ( )
static

pt_BR: Portuguese (Portugal)

◆ PORTUGUESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::PORTUGUESE ( )
static

pt: Portuguese

◆ ROMANIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ROMANIA ( )
static

ro_RO: Romanian (Romania)

◆ ROMANIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ROMANIAN ( )
static

ro: Romanian

◆ ROOT()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::ROOT ( )
static

The root locale is the locale that all other locales derive their data. It does not represent any particular language or region.

◆ RUSSIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::RUSSIA ( )
static

ru_RU: Russian (Russia)

◆ RUSSIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::RUSSIAN ( )
static

ru: Russian

◆ SAUDI_ARABIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SAUDI_ARABIA ( )
static

ar_SA: Arabic (Saudi Arabia)

◆ SERBIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SERBIA ( )
static

sr_RS: Serbian (Serbia)

◆ SERBIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SERBIAN ( )
static

sr: Serbian

◆ SHANGHAINESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SHANGHAINESE ( )
static

wuu: Shanghainese

◆ SIMPLIFIED_CHINESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SIMPLIFIED_CHINESE ( )
static

zh_Hans: Chinese written in the simplified Han script. This represents the Chinese macro-language written in the simplified Han script. By default, it represents Simplified Mandarin.

◆ SINGAPOREAN_ENGLISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SINGAPOREAN_ENGLISH ( )
static

en_SG: English (Singapore)

◆ SLOVAK()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SLOVAK ( )
static

sk: Slovak

◆ SLOVAKIA()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SLOVAKIA ( )
static

sk_SK: Slovak (Slovakia)

◆ SOUTH_AFRICAN_ENGLISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SOUTH_AFRICAN_ENGLISH ( )
static

en_ZA: English (South Africa)

◆ SPAIN_CATALAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SPAIN_CATALAN ( )
static

ca_ES: Catalan (Spain)

◆ SPAIN_SPANISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SPAIN_SPANISH ( )
static

es_ES: Spanish (Spain)

◆ SPANISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SPANISH ( )
static

es: Spanish

◆ SWEDEN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SWEDEN ( )
static

sv_SE: Swedish (Sweden)

◆ SWEDISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SWEDISH ( )
static

sv: Swedish

◆ SWITZERLAND_FRENCH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SWITZERLAND_FRENCH ( )
static

fr_CH: French (Switzerland)

◆ SWITZERLAND_GERMAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SWITZERLAND_GERMAN ( )
static

de_CH: German (Switzerland)

◆ SWITZERLAND_ITALIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::SWITZERLAND_ITALIAN ( )
static

it_CH: Italian (Switzerland)

◆ TAIWAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::TAIWAN ( )
static

zh_TW: Chinese (Taiwan) This represents the Chinese macro-language in Taiwan. By default, it represents Traditional Mandarin in Taiwan.

◆ THAI()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::THAI ( )
static

th: Thai

◆ THAILAND()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::THAILAND ( )
static

th_TH: Thai (Thailand)

◆ toLocale()

::inflection::util::ULocale inflection::util::LocaleUtils::toLocale ( const ::std::u16string &  localeString)
static

Converts a std::u16string representing a locale into a ULocale object. This function requires a the input string to be either in the ICU style C locale (e.g. "en_US") or the two-letter or three-letter ISO-639 code (see ULocale::ULocale()).

Parameters
localeStringThe input string to construct a ULocale from.
Returns
The ULocale representing the input string.

◆ toLocales()

static ::std::vector<::inflection::util::ULocale > inflection::util::LocaleUtils::toLocales ( const ::std::u16string &  localesString)

Converts an array of std::u16string representing locales into a std::vector of ULocale objects. This function requires a the input strings to be either in the ICU style C locale (e.g. "en_US") or the two-letter or three-letter ISO-639 code (see ULocale::ULocale()).

Parameters
localesStringThe input strings to construct an array of ULocales from.
Returns
A std::vector of ULocales representing the input string.

◆ toString() [1/2]

::std::u16string inflection::util::LocaleUtils::toString ( const ::inflection::util::ULocale locale)
static

Converts a ULocale into a std::u16string representation with the separator "_". The string is formatted as such:
%1_%2_%3_%4
Where:
%1 = The language
%2 = The script
%3 = The country
%4 = The variant.

Parameters
localeThe ULocale object to represent as a std::u16string.
Returns
The ULocale object represented as a std::u16string.

◆ toString() [2/2]

::std::u16string inflection::util::LocaleUtils::toString ( const ::inflection::util::ULocale locale,
const ::std::u16string &  separator 
)
static

Converts a ULocale into a std::u16string representation with a given separator. The string is formatted as such:
%1,%2,%3,%4
Where:
%1 = The language
%2 = The script
%3 = The country
%4 = The variant
, = The field separator.

Parameters
localeThe ULocale object to represent as a std::u16string.
separatorThe field separator characters to use.
Returns
The ULocale object represented as a std::u16string.

◆ TRADITIONAL_CHINESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::TRADITIONAL_CHINESE ( )
static

zh_Hant: Chinese written in the traditional Han script This represents the Chinese macro-language written in the traditional Han script. By default, it represents Traditional Mandarin.

◆ TURKEY()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::TURKEY ( )
static

tr_TR: Turkish (Turkey)

◆ TURKISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::TURKISH ( )
static

tr: Turkish

◆ UKRAINE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::UKRAINE ( )
static

uk_UA: Ukrainian (Ukraine)

◆ UKRAINIAN()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::UKRAINIAN ( )
static

uk: Ukrainian

◆ US()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::US ( )
static

en_US: English (United States)

◆ US_SPANISH()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::US_SPANISH ( )
static

es_US: Spanish (United States)

◆ VIETNAM()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::VIETNAM ( )
static

vi_VN: Vietnamese (Vietnam)

◆ VIETNAMESE()

static const ::inflection::util::ULocale & inflection::util::LocaleUtils::VIETNAMESE ( )
static

vi: Vietnamese


The documentation for this class was generated from the following file: