INTL: The best browser API you’re not using
summary
Modern browsers include the Intl API (baseline since 2017) that replaces heavy npm formatters and cuts bundle size by using built‑in formatters for dates, numbers, currencies, lists and text. It provides DateTimeFormat, RelativeTimeFormat and DurationFormat for humanized times, NumberFormat with currency/unit and accounting styles, ListFormat and PluralRules for correct grammar, a Segmenter for words/ graphemes/ sentences, and a Collator for locale-aware sorting; it supports over 7,000 locales and runs off the JS main thread.
AI-written summary · about
chapters (7)
- 0:00INTL API introduction
- 1:37Why INTL is best
- 3:25Formatting dates and times
- 8:46Number and currency formatting
- 12:59Formatting lists and plurals
- 17:14Text segmentation and sorting
- 23:00Summary
related talks
43mJavaScript apps go Int(ernationa)l
28mi18n, l10n & Principles for a More Accessible Web
19mInternationalize your web apps
19mLost in Translation? Intl, the Rosetta Stone of Web Development
31mJavaScript Apps Go Intl
53mIntl is Your Superhero
28mFormat data and strings in any language with FormatJS and react-intl
28mThe *Other* Spec: Internationalization in JavaScript
