Inflection
Morphology Inflection
Loading...
Searching...
No Matches
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::ULocale > toLocales (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::ULocale > getFallbackPair (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::ULocale & ARABIC ()
static const ::inflection::util::ULocale & SAUDI_ARABIA ()
static const ::inflection::util::ULocale & BANGLA ()
static const ::inflection::util::ULocale & INDIA_BANGLA ()
static const ::inflection::util::ULocale & BULGARIAN ()
static const ::inflection::util::ULocale & BULGARIA ()
static const ::inflection::util::ULocale & CATALAN ()
static const ::inflection::util::ULocale & SPAIN_CATALAN ()
static const ::inflection::util::ULocale & CZECH ()
static const ::inflection::util::ULocale & CZECHIA ()
static const ::inflection::util::ULocale & DANISH ()
static const ::inflection::util::ULocale & DENMARK ()
static const ::inflection::util::ULocale & GERMAN ()
static const ::inflection::util::ULocale & GERMANY ()
static const ::inflection::util::ULocale & SWITZERLAND_GERMAN ()
static const ::inflection::util::ULocale & AUSTRIA ()
static const ::inflection::util::ULocale & GREEK ()
static const ::inflection::util::ULocale & GREECE ()
static const ::inflection::util::ULocale & ENGLISH ()
static const ::inflection::util::ULocale & US ()
static const ::inflection::util::ULocale & AUSTRALIA_ENGLISH ()
static const ::inflection::util::ULocale & CANADIAN_ENGLISH ()
static const ::inflection::util::ULocale & SINGAPOREAN_ENGLISH ()
static const ::inflection::util::ULocale & GREAT_BRITAIN ()
static const ::inflection::util::ULocale & NEW_ZEALAND_ENGLISH ()
static const ::inflection::util::ULocale & INDIA_ENGLISH ()
static const ::inflection::util::ULocale & SOUTH_AFRICAN_ENGLISH ()
static const ::inflection::util::ULocale & IRISH_ENGLISH ()
static const ::inflection::util::ULocale & SPANISH ()
static const ::inflection::util::ULocale & SPAIN_SPANISH ()
static const ::inflection::util::ULocale & MEXICO_SPANISH ()
static const ::inflection::util::ULocale & US_SPANISH ()
static const ::inflection::util::ULocale & CHILEAN_SPANISH ()
static const ::inflection::util::ULocale & ESTONIAN ()
static const ::inflection::util::ULocale & ESTONIA ()
static const ::inflection::util::ULocale & FINNISH ()
static const ::inflection::util::ULocale & FINLAND ()
static const ::inflection::util::ULocale & FRENCH ()
static const ::inflection::util::ULocale & FRANCE ()
static const ::inflection::util::ULocale & BELGIUM_FRENCH ()
static const ::inflection::util::ULocale & SWITZERLAND_FRENCH ()
static const ::inflection::util::ULocale & CANADIAN_FRENCH ()
static const ::inflection::util::ULocale & GUJARATI ()
static const ::inflection::util::ULocale & INDIA_GUJARATI ()
static const ::inflection::util::ULocale & HEBREW ()
static const ::inflection::util::ULocale & ISRAEL ()
static const ::inflection::util::ULocale & HINDI ()
static const ::inflection::util::ULocale & INDIA_HINDI ()
static const ::inflection::util::ULocale & CROATIAN ()
static const ::inflection::util::ULocale & CROATIA ()
static const ::inflection::util::ULocale & HUNGARIAN ()
static const ::inflection::util::ULocale & HUNGARY ()
static const ::inflection::util::ULocale & INDONESIAN ()
static const ::inflection::util::ULocale & INDONESIA ()
static const ::inflection::util::ULocale & ICELANDIC ()
static const ::inflection::util::ULocale & ICELAND ()
static const ::inflection::util::ULocale & ITALIAN ()
static const ::inflection::util::ULocale & ITALY ()
static const ::inflection::util::ULocale & SWITZERLAND_ITALIAN ()
static const ::inflection::util::ULocale & JAPANESE ()
static const ::inflection::util::ULocale & JAPAN ()
static const ::inflection::util::ULocale & KAZAKH ()
static const ::inflection::util::ULocale & KAZAKHSTAN ()
static const ::inflection::util::ULocale & KOREAN ()
static const ::inflection::util::ULocale & KOREA ()
static const ::inflection::util::ULocale & KANNADA ()
static const ::inflection::util::ULocale & INDIA_KANNADA ()
static const ::inflection::util::ULocale & LITHUANIAN ()
static const ::inflection::util::ULocale & LITHUANIA ()
static const ::inflection::util::ULocale & MALAY ()
static const ::inflection::util::ULocale & MALAYSIA ()
static const ::inflection::util::ULocale & MALAYALAM ()
static const ::inflection::util::ULocale & INDIA_MALAYALAM ()
static const ::inflection::util::ULocale & MARATHI ()
static const ::inflection::util::ULocale & INDIA_MARATHI ()
static const ::inflection::util::ULocale & NORWEGIAN ()
static const ::inflection::util::ULocale & NORWAY ()
static const ::inflection::util::ULocale & DUTCH ()
static const ::inflection::util::ULocale & NETHERLANDS ()
static const ::inflection::util::ULocale & BELGIUM_DUTCH ()
static const ::inflection::util::ULocale & ODIA ()
static const ::inflection::util::ULocale & INDIA_ODIA ()
static const ::inflection::util::ULocale & PUNJABI ()
static const ::inflection::util::ULocale & INDIA_PUNJABI ()
static const ::inflection::util::ULocale & POLISH ()
static const ::inflection::util::ULocale & POLAND ()
static const ::inflection::util::ULocale & PORTUGUESE ()
static const ::inflection::util::ULocale & PORTUGAL ()
static const ::inflection::util::ULocale & BRAZIL ()
static const ::inflection::util::ULocale & ROMANIAN ()
static const ::inflection::util::ULocale & ROMANIA ()
static const ::inflection::util::ULocale & RUSSIAN ()
static const ::inflection::util::ULocale & RUSSIA ()
static const ::inflection::util::ULocale & SLOVAK ()
static const ::inflection::util::ULocale & SLOVAKIA ()
static const ::inflection::util::ULocale & SERBIAN ()
static const ::inflection::util::ULocale & SERBIA ()
static const ::inflection::util::ULocale & SWEDISH ()
static const ::inflection::util::ULocale & SWEDEN ()
static const ::inflection::util::ULocale & TAMIL ()
static const ::inflection::util::ULocale & INDIA_TAMIL ()
static const ::inflection::util::ULocale & TELUGU ()
static const ::inflection::util::ULocale & INDIA_TELUGU ()
static const ::inflection::util::ULocale & THAI ()
static const ::inflection::util::ULocale & THAILAND ()
static const ::inflection::util::ULocale & TURKISH ()
static const ::inflection::util::ULocale & TURKEY ()
static const ::inflection::util::ULocale & UKRAINIAN ()
static const ::inflection::util::ULocale & UKRAINE ()
static const ::inflection::util::ULocale & URDU ()
static const ::inflection::util::ULocale & INDIA_URDU ()
static const ::inflection::util::ULocale & PAKISTAN_URDU ()
static const ::inflection::util::ULocale & VIETNAMESE ()
static const ::inflection::util::ULocale & VIETNAM ()
static const ::inflection::util::ULocale & SHANGHAINESE ()
static const ::inflection::util::ULocale & CHINA_SHANGHAINESE ()
static const ::inflection::util::ULocale & CANTONESE ()
static const ::inflection::util::ULocale & CHINA_CANTONESE ()
static const ::inflection::util::ULocale & HONGKONG_CANTONESE ()
static const ::inflection::util::ULocale & CHINESE ()
static const ::inflection::util::ULocale & SIMPLIFIED_CHINESE ()
static const ::inflection::util::ULocale & TRADITIONAL_CHINESE ()
static const ::inflection::util::ULocale & HONGKONG_CHINESE ()
static const ::inflection::util::ULocale & CHINA ()
static const ::inflection::util::ULocale & TAIWAN ()
static const ::inflection::util::ULocale & ROOT ()

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()

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

ar: Arabic

◆ areLanguageScriptCompatible()

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()

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

en_AU: English (Australia)

◆ AUSTRIA()

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

de_AT: German (Austria)

◆ BANGLA()

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

bn: Bengali (Bangla)

◆ BELGIUM_DUTCH()

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

nl_BE: Dutch (Belgium)

◆ BELGIUM_FRENCH()

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

fr_BE: French (Belgium)

◆ BRAZIL()

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

pt_BR: Portuguese (Brazil)

◆ BULGARIA()

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

bg_BG: Bulgarian (Bulgaria)

◆ BULGARIAN()

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

bg: Bulgarian

◆ CANADIAN_ENGLISH()

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

en_CA: English (Canada)

◆ CANADIAN_FRENCH()

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

fr_CA: French (Canada)

◆ CANTONESE()

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

yue: Cantonese

◆ CATALAN()

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

ca: Catalan

◆ CHILEAN_SPANISH()

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

es_CL: Spanish (Chile)

◆ CHINA()

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()

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()

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

wuu_CN: Shanghainese (China)

◆ CHINESE()

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()

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

hr_HR: Croatian (Croatia)

◆ CROATIAN()

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

hr: Croatian

◆ CZECH()

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

cs: Czech

◆ CZECHIA()

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

cs: Czech (Czechia or Czech Republic)

◆ DANISH()

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

da: Danish

◆ DENMARK()

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

da_DK: Danish (Denmark)

◆ DUTCH()

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

nl: Dutch

◆ ENGLISH()

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

en: English

◆ ESTONIA()

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

et_EE: Estonian (Estonia)

◆ ESTONIAN()

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

et: Estonian

◆ FINLAND()

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

fi_FI: Finnish (Finland)

◆ FINNISH()

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

fi: Finnish

◆ FRANCE()

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

fr_FR: French (France)

◆ FRENCH()

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

fr: French

◆ GERMAN()

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

de: German

◆ GERMANY()

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

de_DE: German (Germany)

◆ getFallbackPair()

::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()

::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()

::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()

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()

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

el_GR: Greek (Greece)

◆ GREEK()

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

el: Greek

◆ GUJARATI()

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

gu: Gujarati

◆ HEBREW()

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

he: Hebrew

◆ HINDI()

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

hi: Hindi

◆ HONGKONG_CANTONESE()

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()

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()

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

hu: Hungarian

◆ HUNGARY()

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

hu_HU: Hungarian (Hungary)

◆ ICELAND()

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

is_IS: Icelandic (Iceland)

◆ ICELANDIC()

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

is: Icelandic

◆ INDIA_BANGLA()

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

bn_IN: Bengali (India)

◆ INDIA_ENGLISH()

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

en_IN: English (India)

◆ INDIA_GUJARATI()

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

gu_IN: Gujarati (India)

◆ INDIA_HINDI()

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

hi_IN: Hindi (India)

◆ INDIA_KANNADA()

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

kn_IN: Kannada (India)

◆ INDIA_MALAYALAM()

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

ml_IN: Malayalam (India)

◆ INDIA_MARATHI()

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

mr_IN: Marathi (India)

◆ INDIA_ODIA()

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

or_IN: Odia (India)

◆ INDIA_PUNJABI()

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

pa_IN: Punjabi (India)

◆ INDIA_TAMIL()

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

ta_IN: Tamil (India)

◆ INDIA_TELUGU()

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

te_IN: Telugu (India)

◆ INDIA_URDU()

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

ur_IN: Urdu (India)

◆ INDONESIA()

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

id_ID: Indonesian (Indonesia)

◆ INDONESIAN()

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

id: Indonesian

◆ IRISH_ENGLISH()

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

en_IE: English (Ireland)

◆ ISRAEL()

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

he_IL: Hebrew (Israel)

◆ ITALIAN()

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

it: Italian

◆ ITALY()

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

it_IT: Italian (Italy)

◆ JAPAN()

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

ja_JP: Japanese (Japan)

◆ JAPANESE()

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

ja: Japanese

◆ KANNADA()

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

kn: Kannada

◆ KAZAKH()

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

kk: Kazakh

◆ KAZAKHSTAN()

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

kk_KZ: Kazakh (Kazakhstan)

◆ KOREA()

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

ko_KR: Korean (South Korea)

◆ KOREAN()

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

ko: Korean

◆ LITHUANIA()

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

lt_LT: Lithuanian (Lithuania)

◆ LITHUANIAN()

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

lt: Lithuanian

◆ MALAY()

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

ms: Malay

◆ MALAYALAM()

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

ml: Malayalam

◆ MALAYSIA()

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

ms_MY: Malay (Malaysia)

◆ MARATHI()

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

mr: Marathi

◆ MEXICO_SPANISH()

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

es_MX: Spanish (Mexico)

◆ NETHERLANDS()

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

nl_NL: Dutch (Netherlands)

◆ NEW_ZEALAND_ENGLISH()

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

en_NZ: English (New Zealand)

◆ NORWAY()

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

nb_NO: Norwegian Bokmål (Norway)

◆ NORWEGIAN()

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

nb: Norwegian Bokmål

◆ ODIA()

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

or: Odia

◆ PAKISTAN_URDU()

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

ur_PK: Urdu (Pakistan)

◆ POLAND()

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

pl_PL: Polish (Poland)

◆ POLISH()

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

pl: Polish

◆ PORTUGAL()

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

pt_BR: Portuguese (Portugal)

◆ PORTUGUESE()

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

pt: Portuguese

◆ PUNJABI()

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

pa: Punjabi

◆ ROMANIA()

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

ro_RO: Romanian (Romania)

◆ ROMANIAN()

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

ro: Romanian

◆ ROOT()

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()

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

ru_RU: Russian (Russia)

◆ RUSSIAN()

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

ru: Russian

◆ SAUDI_ARABIA()

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

ar_SA: Arabic (Saudi Arabia)

◆ SERBIA()

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

sr_RS: Serbian (Serbia)

◆ SERBIAN()

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

sr: Serbian

◆ SHANGHAINESE()

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

wuu: Shanghainese

◆ SIMPLIFIED_CHINESE()

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()

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

en_SG: English (Singapore)

◆ SLOVAK()

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

sk: Slovak

◆ SLOVAKIA()

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

sk_SK: Slovak (Slovakia)

◆ SOUTH_AFRICAN_ENGLISH()

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

en_ZA: English (South Africa)

◆ SPAIN_CATALAN()

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

ca_ES: Catalan (Spain)

◆ SPAIN_SPANISH()

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

es_ES: Spanish (Spain)

◆ SPANISH()

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

es: Spanish

◆ SWEDEN()

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

sv_SE: Swedish (Sweden)

◆ SWEDISH()

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

sv: Swedish

◆ SWITZERLAND_FRENCH()

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

fr_CH: French (Switzerland)

◆ SWITZERLAND_GERMAN()

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

de_CH: German (Switzerland)

◆ SWITZERLAND_ITALIAN()

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

it_CH: Italian (Switzerland)

◆ TAIWAN()

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.

◆ TAMIL()

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

ta: Tamil

◆ TELUGU()

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

te: Telugu

◆ THAI()

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

th: Thai

◆ THAILAND()

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()

::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()

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()

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

tr_TR: Turkish (Turkey)

◆ TURKISH()

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

tr: Turkish

◆ UKRAINE()

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

uk_UA: Ukrainian (Ukraine)

◆ UKRAINIAN()

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

uk: Ukrainian

◆ URDU()

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

ur: Urdu

◆ US()

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

en_US: English (United States)

◆ US_SPANISH()

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

es_US: Spanish (United States)

◆ VIETNAM()

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

vi_VN: Vietnamese (Vietnam)

◆ VIETNAMESE()

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

vi: Vietnamese


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