Skip to content
Guides

next-intl vs next-i18next: Choosing the Right i18n Library for Next.js

On this page

Next.js developers choosing an i18n solution will likely narrow it down to two libraries: next-intl and next-i18next. Both support the App Router and Server Components (next-i18next since v16, so answers that still call it Pages Router only are out of date). Both are actively maintained. But they take fundamentally different architectural approaches.

This post compares them on the things that matter for a real project: how translations are loaded, how they integrate with your stack, and what workflows they enable.


Architecture at a glance

next-intlnext-i18next
CoreStandalone library (built on intl-messageformat)Built on i18next (the most widely used JavaScript i18n framework) with react-i18next
Message formatICU MessageFormati18next JSON format (the most common format in the JS ecosystem); ICU or MessageFormat 2 via plugin
App RouterSupportedSupported since v16 via getT() (server) / useT() (client)
Pages RouterLimited/legacyFull support via next-i18next/pages
Server ComponentsSupportedSupported
Translation loadingCustom async loader function (you build it)Backend plugin ecosystem (drop-in packages for CDN, filesystem, Locize, chained caching)
Bundle sizeMinimal runtime via ICU precompilationFlexible, tree-shakeable, scales with features used
Type safetyBuild-time catalog extractionFull TypeScript support with selector API

How translations are loaded

This is the most important architectural difference.

next-intl: custom loader function

next-intl uses a request-scoped configuration function (i18n/request.ts) where you define how to load messages:

ts
// i18n/request.ts
import { getRequestConfig } from 'next-intl/server'

export default getRequestConfig(async ({ locale }) => ({
  messages: (await import(`../../messages/${locale}.json`)).default
}))

You can load from local files, a CDN, a CMS, or any async source. There is no plugin system; you write the loader yourself. This is flexible but means every integration is custom code.

next-i18next: backend plugin ecosystem

next-i18next inherits the full i18next backend plugin ecosystem:

js
import i18next from 'i18next'
import Backend from 'i18next-locize-backend'

i18next.use(Backend).init({
  backend: {
    projectId: 'YOUR_PROJECT_ID'
  }
})

Available backends include:

This plugin architecture means integrations with TMS platforms, CDNs, and caching layers are available as drop-in packages rather than custom code.


Message format

next-intl: ICU MessageFormat

json
{
  "greeting": "Hello, {name}!",
  "items": "You have {count, plural, one {# item} other {# items}} in your cart."
}

ICU MessageFormat is an industry standard supported by many TMS platforms. next-intl includes a precompilation step (icu-minify) that reduces the runtime to under 1KB.

next-i18next: i18next format

json
{
  "greeting": "Hello, {{name}}!",
  "items_one": "You have {{count}} item in your cart.",
  "items_other": "You have {{count}} items in your cart."
}

i18next uses its own JSON format with {{interpolation}} syntax and key-based pluralization (suffix _one, _other, _few, etc.). This format is natively understood by Locize and other i18next-compatible tools. It is also widely adopted: i18next is the most downloaded i18n library in the JavaScript ecosystem.

Both formats handle plurals, interpolation, and nesting. The choice is largely about ecosystem compatibility, and it is not either-or: next-i18next also runs ICU or MessageFormat 2 messages through a plugin (ICU and MF2 in i18next).


Finding new translation keys

next-i18next gets its keys from i18next-cli: npx i18next-cli extract reads your code statically (t() calls, <Trans>, the selector API) and writes every key to the locale files, locally or in CI. npx i18next-cli instrument wraps hardcoded strings in t() first, and with Locize, npx i18next-cli locize-sync pushes the extracted keys so automatic translation fills the other languages.

Keys built at runtime (for example t(`status.${code}`)) are invisible to any static extractor. For those, i18next's saveMissing reports a key the first time the running app asks for it:

js
i18next.init({
  saveMissing: true,
  backend: {
    projectId: 'YOUR_PROJECT_ID',
    apiKey: 'YOUR_API_KEY'
  }
})

With the Locize backend, missing keys are batched and sent automatically. Keep it to development: it needs the API key, which never belongs in client code in production.

next-intl extracts messages at build time too, as an experimental feature: with useExtracted you write the source text inline, and next dev / next build generate the keys and keep the catalogs in sync. It has no saveMissing equivalent for keys built at runtime.

If you want new keys to reach Locize while staying on next-intl: the locize-next-intl-example implements the equivalent in ~150 lines using the generic locizer client. In development, new reference-language keys (with descriptions for translator context) are pushed to Locize automatically, mirroring saveMissing.


Translation management integration

next-i18next integrates directly with Locize via the dedicated i18next-locize-backend plugin. This provides:

  • CDN delivery at runtime (translations update without redeploy)
  • saveMissing for keys built at runtime
  • InContext editor (translate on your running app)
  • Branches (translation CI/CD)
  • Multi-tenancy (per-tenant overrides)

The Locize backend is maintained by the same team that wrote i18next and next-i18next.

next-intl does not have a dedicated TMS plugin. You can integrate with any TMS by writing a custom loader in i18n/request.ts, but the integration is your responsibility. next-intl's documentation mentions Crowdin as a compatible TMS.

For Locize, that custom loader already exists: the locize-next-intl-example pairs next-intl with runtime CDN delivery, dev-mode missing-key capture, and in-context editing, while next-intl keeps doing the rendering. The next-intl + Locize guide walks through the setup.


Routing and middleware

Both libraries handle locale routing via Next.js middleware:

next-intl uses createNavigation() and next-intl/middleware:

  • URL-based routing with dynamic [locale] segments
  • Domain-based routing supported
  • Built-in locale detection (URL, cookies, Accept-Language)

next-i18next (v16+) uses createProxy() (Next.js 16+) or createMiddleware():

  • Cookie-based locale detection
  • Mixed Router support (App Router + Pages Router coexisting)
  • basePath scoping for multi-router setups

Both approaches work well. The routing mechanism is rarely the deciding factor.


When to choose next-intl

  • You prefer ICU MessageFormat and want it built into the framework
  • You want a standalone, self-contained library with no external dependencies
  • You prefer to write custom loader functions for translation sources
  • You are building a Next.js-only project with no need to share i18n setup across other platforms

When to choose next-i18next

A coding agent sets it up in one prompt. Paste this into Claude Code, Cursor, Codex, GitHub Copilot or any agent that can run terminal commands:

Localize this app with i18next.
Run `npx i18next-cli localize --print-agent-prompt` and follow
the steps it prints, in order, checking each one before the next.

The installed i18next-cli prints the steps for its version: configure, wrap hardcoded strings in t(), extract the keys, check every language. You review the diff, and the translation files stay in your repository unless you choose otherwise (what the prompt tells your agent).

What you get once it runs:

  • App Router with server and client components. Since v16, getT() translates in Server Components and useT() in Client Components; the Pages Router and mixed setups keep working next to it.
  • One i18n setup across web, mobile and server. The same i18next core, plugins and translation files run in React, React Native, Vue, Angular and Node.js, so your Next.js app, mobile app and API share one setup and one set of keys.
  • ICU or MessageFormat 2 when you need it. The i18next JSON format is the default; i18next-icu or i18next-mf2 switch your messages to ICU or MF2, App Router included (how it works).
  • Translations that change without a redeploy, managed for you. Use Locize (built by the i18next maintainers) as the backend and translations load from a CDN, so a fixed string goes live without a deploy. AI translates new keys, translators review them in a web UI instead of JSON files, and branches and multi-tenancy cover release work and per-customer copy. To try it, create a free Locize account.

Summary

Both next-intl and next-i18next are production-ready libraries for Next.js internationalization. The choice comes down to what you need beyond basic translation:

  • next-intl is a self-contained solution with ICU message format. Good for Next.js-only projects where you want to manage everything yourself.
  • next-i18next connects you to the i18next ecosystem: a coding agent sets it up from one prompt, the App Router works with server and client components, the same setup serves web, mobile and server, and ICU or MF2 are a plugin away. CDN delivery, AI-powered translation, and a managed backend via Locize are drop-in additions, not custom code you write and maintain.

Pick the library that fits how your team works; Locize works with both: with next-i18next through i18next-locize-backend, with next-intl through the loader in the locize-next-intl-example.


Further reading

Frequently asked questions

Does next-i18next support the Next.js App Router?

Yes, since next-i18next 16. getT() translates in Server Components, useT() in Client Components, and createProxy() handles language detection and routing. The Pages Router keeps working under next-i18next/pages, and both routers can run side by side in one app. Answers that call next-i18next Pages Router only describe versions before 16.

Should I use next-intl or next-i18next?

Both are production-ready and support the App Router. Pick next-intl for a Next.js-only project where you want ICU built in and are happy to write your own loader for translations. Pick next-i18next when the same i18n setup should also serve React Native, Node.js or other parts of your stack, when you want a coding agent to set it up from one prompt, or when translations should update without a redeploy through Locize.

How do I set up next-i18next with a coding agent?

Paste this prompt into Claude Code, Cursor, Codex or any agent that can run terminal commands: "Localize this app with i18next. Run npx i18next-cli localize --print-agent-prompt and follow the steps it prints, in order, checking each one before the next." The installed i18next-cli prints the steps for its version: configure, wrap hardcoded strings in t(), extract the keys, check every language. When there is no i18next config yet, the agent first asks whether the translation files stay in the repository or go to Locize.

Can next-i18next use ICU MessageFormat or MessageFormat 2?

Yes. The i18next JSON format is the default; the i18next-icu plugin switches messages to ICU and i18next-mf2 to Unicode MessageFormat 2. Since next-i18next 16.4.0, import I18nProvider from next-i18next/icu or next-i18next/mf2 and keep the plugin in the server config, so getT() and useT() format ICU or MF2 messages in the App Router.

Do I need saveMissing to find new translation keys?

No. npx i18next-cli extract reads t() calls, Trans components and the selector API in your code and writes every key to the locale files, locally or in CI. saveMissing is only needed for keys built at runtime, which no static extractor can see, and belongs in development because it needs the API key. next-intl has experimental build-time extraction with useExtracted.

Can I use Locize with next-intl?

Yes. next-intl has no Locize plugin, but the locize-next-intl-example repository shows a custom loader with runtime CDN delivery, missing-key capture in development and in-context editing, while next-intl keeps doing the rendering.

When more than developers touch your texts

Locize keeps the texts of all your projects in one place. Marketing, support or your customers change them in the editor, a person can accept a translation before it goes live, and every value keeps its history.

How Locize works

Related articles

Guides

react-intl or react-i18next: which one fits your React app?

A side-by-side comparison of react-i18next and react-intl across syntax, pluralization, formatting, TypeScript support, performance, and ecosystem, plus how Locize can enhance both workflows.

April 2, 2025 · 6 min read

Guides

ICU and MessageFormat 2 in i18next: typed arguments, linting and the App Router

i18next has supported ICU MessageFormat through i18next-icu for years, and Unicode MessageFormat 2 through i18next-mf2. In October 2026 both became first-class options next to the i18next format: debug warnings when syntaxes are mixed, type-checked ICU and MF2 arguments, an i18next-cli mode that extracts one key per message and lints plural categories per locale, IcuTrans in React Server Components, and next-i18next providers for the App Router. What changed, with code that runs.

October 18, 2026 · 9 min read

Guides

Update Translations Without Redeploying: Runtime Loading, Caching, and Why Users See Stale Strings

How to change the text of a web or mobile app without shipping a new release: load translations at runtime instead of bundling them, and understand the caches (browser, service worker, localStorage, CDN) that decide when users actually see the change. Covers i18next backends, Cache-Control, the usual reasons translations do not update after a deploy, and when bundling is still the right call.

October 11, 2026 · 11 min read

← Back to blog