Home

intl

Intl is a built-in JavaScript object that provides language-sensitive functionality for internationalization and localization. It is defined by the ECMAScript Internationalization API (ECMA-402). The object offers constructors and related utilities that enable locale-aware formatting and comparison for numbers, dates and times, currencies, lists, and text, as well as locale display names.

Core constructors include Intl.NumberFormat, Intl.DateTimeFormat, and Intl.Collator. More recent additions include Intl.RelativeTimeFormat, Intl.ListFormat, Intl.DisplayNames, Intl.Segmenter, and

How it works: formatting and collation rules are driven by locale data, which is typically sourced from

Usage considerations include varying levels of support across browsers and runtimes, potential differences in locale coverage,

See also ECMA-402 and Unicode CLDR for the standards and data underpinning Intl functionality.

Intl.Locale,
along
with
utility
methods
such
as
Intl.getCanonicalLocales.
These
APIs
allow
developers
to
format
data
according
to
a
specified
locale
(for
example
"en-US",
"ja-JP"
or
"de-DE"),
and
to
fall
back
gracefully
when
a
locale
is
unavailable.
the
Unicode
Common
Locale
Data
Repository
(CLDR)
and,
in
many
environments,
ICU
data.
This
enables
locale-aware
rules
for
number
styles,
currency
placement,
date
and
time
formats,
string
sorting,
and
more.
The
API
is
designed
to
be
progressive,
with
environments
often
supporting
a
core
subset
first
and
expanding
over
time.
and
the
need
for
fallbacks
when
certain
locales
or
features
are
not
available.
Developers
may
also
use
polyfills
to
provide
consistent
behavior
in
older
environments.