Skip to content

Runtimes and React Native

Runtime Intl Parla uses
Vite’s default browser target: Safari 16.4, Chrome 111, Firefox 114 All
Node 22+ All
Hermes (React Native) No PluralRules, no Locale

A missing API throws, naming its polyfill, the first time a message needs it.

Import them before the app:

index.js
import '@formatjs/intl-locale/polyfill.js';
import '@formatjs/intl-pluralrules/polyfill.js';
import '@formatjs/intl-pluralrules/locale-data/en.js'; // one per locale

React Native has no navigator.languages; use expo-localization or react-native-localize:

import { getLocales } from 'expo-localization';
const tags = getLocales().map((l) => l.languageTag);
createParla({ catalog, locale: matchLocale(tags, catalog.locales, catalog.sourceLocale) });

Without Intl.Locale, de-AT still finds de, but zh-TW no longer infers zh-Hant.

React Native
iOS NumberFormat Converts :unit to the locale’s system (en: 5 km → 3.107mi), ignores notation and signDisplay
Bigints Printed as plain digits
Metro Bundles every import() chunk into the one bundle; load still evaluates only the locale it needs

On iOS, a catalog with :unit, notation or signDisplay also needs @formatjs/intl-numberformat/polyfill-force.js and its locale-data.