Using Hermes? Prefer native Intl
We recommend the Rust-backed Hermes Intl SDK over TypeScript polyfills for Hermes apps. It installs twelve Intl APIs before your application JavaScript runs, with locale data compiled into the SDK.
Get started with native Intl. Native integration requires rebuilding your app. Use TypeScript polyfills when you cannot add native code.
Browser#
Browser Support
We support IE11 & 2 most recent versions of Edge, Chrome, Firefox &
Safari. If you need older browser support, take a look at
polyfill-library that
also uses formatjs but pre-bundle other polyfills that we use.
React Intl relies on these Intl APIs:
-
Intl.NumberFormat: Available on IE11+
-
Intl.DateTimeFormat: Available on IE11+
-
Intl.PluralRules: This can be polyfilled using this package.
-
(Optional) Intl.RelativeTimeFormat: Required if you use
formatRelativeTimeorFormattedRelativeTime. This can be polyfilled using this package. -
(Optional) Intl.DisplayNames: Required if you use
formatDisplayNameorFormattedDisplayName. This can be polyfilled using this package. -
(Optional)
Intl.DurationFormat: Required forformatDuration,formatDurationToParts,FormattedDuration, andFormattedDurationParts. This can be polyfilled using@formatjs/intl-durationformat.
We officially support IE11 along with 2 most recent versions of Edge, Chrome & Firefox.
Node.js#
React Intl requires Node.js 16 or later, which includes full internationalization support by default. If your Node.js version is missing any of the Intl APIs above, you'd have to polyfill them accordingly.
React Native#
For Hermes apps, we recommend the native Hermes Intl SDK.
Install it before importing react-intl. Use the
TypeScript polyfill fallback if you cannot add
native code or rebuild your app.
For other React Native runtimes, make sure your runtime has built-in Intl support (similar to JSC International variant). See these issues for more details:
- https://github.com/formatjs/formatjs/issues/1356
- https://github.com/formatjs/formatjs/issues/992
React Native on iOS without Hermes#
If you cannot use the Intl variant of JSC (e.g on iOS), follow the instructions in polyfills to polyfill the following APIs (in this order):