Runtime requirements
Source URL: https://next-intl.dev/docs/environments/runtime-requirements
DocsEnvironmentsRuntime requirements
Runtime requirements
Section titled “Runtime requirements”Browser
Section titled “Browser”The source code of next-intl is compiled for the same browsers that Next.js supports.
Based on the features you’re using, you have to make sure your target browsers support the following APIs:
- Basic usage:
Intl.Locale(compatibility) - Date & time formatting:
Intl.DateTimeFormat(compatibility) - Number formatting:
Intl.NumberFormat(compatibility) - Pluralization:
Intl.PluralRules(compatibility) - Relative time formatting:
Intl.RelativeTimeFormat(compatibility) - List formatting:
Intl.ListFormat(compatibility)
If you target a browser that doesn’t support all the required APIs, consider using polyfills.
Cloudflare provides a polyfill service that you can use to load the necessary polyfills for a given locale.
Example:
IntlPolyfills.tsx
import {useLocale} from 'next-intl'; import Script from 'next/script';
function IntlPolyfills() { const locale = useLocale();
const polyfills = [ 'Intl', 'Intl.Locale', 'Intl.DateTimeFormat', `Intl.DateTimeFormat.~locale.${locale}`, `Intl.NumberFormat`, `Intl.NumberFormat.~locale.${locale}`, 'Intl.PluralRules', `Intl.PluralRules.~locale.${locale}`, 'Intl.RelativeTimeFormat', `Intl.RelativeTimeFormat.~locale.${locale}`, 'Intl.ListFormat', `Intl.ListFormat.~locale.${locale}` ];
return ( ); }⚠️
Note that the polyfill service doesn’t support every locale. You can find a list of the available polyfills in the polyfill-service repository (e.g. search for Intl.DateTimeFormat.~locale.de-AT).
Node.js
Section titled “Node.js”The minimum version to support all relevant Intl APIs is Node.js 13. Starting from this version, all required APIs are available.