Standard built-ins
Intl.Locale
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
| Name | Type | Description |
|---|---|---|
| tag | String | Intl.Locale | Locale identifier. |
| options | Object | Formatting options. |
Return Value
Intl.Locale
Locale object.
Working Example
Example Snippetjavascript
console.log(new Intl.Locale("fa-IR").toString());