Standard built-ins

Intl.Locale

Try the free JavaScript compiler

Represents parsed Unicode locale identifier and extensions; does not itself prove a service supports the locale.

Formal Syntax & Structure

javascript syntaxjavascript
new Intl.Locale(tag, [options])

Parameters & Attributes

NameTypeDescription
tagString | Intl.LocaleLocale identifier.
optionsObjectFormatting options.

Return Value

Intl.Locale

Locale object.

Working Example

Example Snippetjavascript
console.log(new Intl.Locale("fa-IR").toString());
JavaScript Reference