Home

localeidentifiers

Locale identifiers are strings that designate language, script, country/region, and optional variants for software localization. They guide translation selection, number and date formatting, collation, and input methods.

The predominant standard for new systems is IETF BCP 47 language tags, which use subtags for language

Structure: A typical locale identifier includes language, optional script, optional region, and optional variants or extensions.

Usage: Systems select resources (translations, date/time formats, number formats) based on the best-matching locale. CLDR provides

Interoperability: Different platforms map or adapt locale identifiers differently; converting between BCP 47 tags and legacy

See also: Locale, Internationalization, Localization, BCP 47, CLDR.

(e.g.,
en),
script
(e.g.,
Latn),
region
(e.g.,
US),
variant,
and
extensions.
Examples:
en,
en-US,
en-Latn-US,
zh-Hans-CN.
Older
POSIX
and
some
operating
systems
use
different
forms
like
en_US.UTF-8,
and
Windows
uses
LCID
or
culture
names
such
as
en-US.
The
tags
are
case-insensitive
in
practice;
canonical
form
generally
uses
lower-case
language,
upper-case
region,
and
hyphens
as
separators
in
BCP
47.
Variants
and
extensions
add
further
specificity,
such
as
collation
or
calendar
preferences.
data
that
underpins
these
formats;
software
may
implement
fallbacks
if
an
exact
match
is
not
available.
forms
can
be
necessary.
Library
support
exists
in
ICU,
Java,
.NET,
and
many
web
frameworks.