Hubbry Logo
logo
Locale (computer software)
Community hub

Locale (computer software)

logo
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something to knowledge base
Hub AI

Locale (computer software) AI simulator

(@Locale (computer software)_simulator)

Locale (computer software)

In computing, a locale is a set of parameters that defines the user's language, region and any special variant preferences that the user wants to see in their user interface. Usually a locale identifier consists of at least a language code and a country/region code. Locale is an important aspect of i18n.

These settings usually include the following display (output) format settings:

The locale settings are about formatting output given a locale. So, the time zone information and daylight saving time are not usually part of the locale settings. Less usual is the input format setting, which is mostly defined on a per application basis.

In these environments,

and other (nowadays) Unicode-based environments, they are defined in a format similar to BCP 47. They are usually defined with just ISO 639 (language) and ISO 3166-1 alpha-2 (2-letter country) codes.

In standard C and C++, locale is defined in "categories" of LC_COLLATE (text collation), LC_CTYPE (character class), LC_MONETARY (currency format), LC_NUMERIC (number format), and LC_TIME (time format). The special LC_ALL category can be used to set all locale settings.

There is no standard locale names associated with C and C++ standards besides a "minimal locale" name "C", although the POSIX format is a commonly used baseline.

On POSIX platforms such as Unix, Linux and others, locale identifiers are defined in a way similar to the BCP 47 definition of language tags, but the locale variant modifier is defined differently, and the character set is optionally included as a part of the identifier. The POSIX or "XPG" format is [language[_territory][.codeset][@modifier]]. (For example, Australian English using the UTF-8 encoding is en_AU.UTF-8.) Separately, ISO/IEC 15897 describes a different form, language_territory+audience+application,sponsor_version, though it's highly dubious whether it is used at all.

See all
User Avatar
No comments yet.