A Next.js-focused i18n package with ICU messages, locale-aware dates and numbers, type-safe hooks, and localized routing for App Router and Server Components.
Overview
next-intl is a library for adding internationalization to Next.js apps. It centralizes translated copy, formatting, and routing so UI code can stay focused on components instead of ad hoc locale handling.
Messages use ICU syntax with interpolation, plural rules, enum labels, and rich text segments. Formatting helpers cover dates, times, relative time, and numbers while accounting for server versus client context such as time zones.
Developers call a hooks-based API—translations, formatters, locale, time zone, and “now”—across client and server boundaries. The project emphasizes compatibility with the App Router, Server Components, and static generation paths described on its site.
Localized routing can expose distinct pathnames per language, including SEO-oriented localized segments. A companion CLI is mentioned for statically checking message keys against source and optionally filling gaps.
Key features
- ICU message syntax and plurals
- Date, time, and number formatting
- Type-safe translation keys
- Hooks-based translation API
- App Router and Server Components support
- Internationalized pathname routing
- Optional message linting via eloqnt/cli
Use cases
- Multilingual Next.js marketing or product sites
- E-commerce or portals with locale-specific URLs
- Apps needing consistent server and client i18n
- Teams standardizing on one Next.js i18n API