3.12. kink/LOCALE

Provides locale specific data.

3.12.1. LOCALE.for(Lang_tag)

LOCALE.for returns a locale val which matches the language tag best.

It is not guaranteed that “lang_tag” method of the result returns the same str as Lang_tag.

3.12.2. type locale

A locale is a set of parameters used for software internationalization specific to a combination of language, region and other variants.

Locale.lang_tag

“lang_tag” method returns thes str of the language tag of the locale.

The result is a syntactically well-formed IETF BCP47 language tag. It is not guaranteed that subtags are registered in IANA Language Subtag Registry.

Locale.group_sep

“group_sep” method returns a str which separates groups in the integral part in the locale.

Locale.decimal_sep

“decimal_sep” method returns a str which separates the integral part and the fractional part in the locale.

X == Y

Two locales are equal when the language tags of them are equal.

Locale.repr

“repr” method returns a str such as "Locale(ja-JP)".

3.12.3. LOCALE.is?(Val)

LOCALE.is? returns whether Val is a locale val.

3.12.4. LOCALE.root

LOCALE.root returns the empty locale which is neutral to any language or region.

3.12.5. LOCALE.default

LOCALE.default returns the locale which is default for the runtime.