ECMAScript Internationalization API - Intl: Difference between revisions
From WikiMLT
m Стадий: 5 [Фаза:Утвърждаване, Статус:Авторизиран]; Категория:JavaScript |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 13: | Line 13: | ||
== References == | == References == | ||
* MDN: ''' | * MDN: '''[https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl <code>Intl</code> ECMAScript Internationalization API]''' | ||
== Simple example == | == Simple example == | ||
Line 28: | Line 28: | ||
{{devStage | {{devStage | ||
| Прндл = JavaScript | | Прндл = JavaScript | ||
| Стадий = | | Стадий = 6 | ||
| Фаза = Утвърждаване | | Фаза = Утвърждаване | ||
| Статус = | | Статус = Утвърден | ||
| ИдтПт = Spas | | ИдтПт = Spas | ||
| РзбПт = Spas | | РзбПт = Spas |
Latest revision as of 20:27, 21 March 2023
The Intl
object is the namespace for the ECMAScript Internationalization API, which provides language sensitive string comparison, number formatting, and date and time formatting. The Intl
object provides access to several constructors as well as functionality common to the internationalization constructors and other language sensitive functions.
References
Simple example
const formatter = new Intl.RelativeTimeFormat("bg-BG", { style: "long" });
formatter.format(-1, "minute");
'преди 1 минута'