IntlPull
Tutorial
12 min read

Next.js App Router con react-intl: Tutorial Completo i18n 2026

Aprende a configurar react-intl (FormatJS) en Next.js App Router. IntlProvider, FormattedMessage y cambio de idioma.

IntlPull Team
IntlPull Team
03 Feb 2026, 11:44 AM [PST]
On this page
Summary

Aprende a configurar react-intl (FormatJS) en Next.js App Router. IntlProvider, FormattedMessage y cambio de idioma.

Respuesta Rápida

Para usar react-intl con Next.js App Router: Instala react-intl, crea archivos de mensajes en formato ICU y envuelve tu app con IntlProvider.


Configuración

Terminal
npm install react-intl @formatjs/intl-localematcher

messages/es.json:

JSON
1{
2  "home.titulo": "Bienvenido a nuestra aplicación",
3  "home.items": "{count, plural, =0 {Sin artículos} one {# artículo} other {# artículos}}"
4}

IntlProvider

TSX
1'use client';
2import { IntlProvider } from 'react-intl';
3
4export function IntlClientProvider({ locale, messages, children }) {
5  return (
6    <IntlProvider locale={locale} messages={messages}>
7      {children}
8    </IntlProvider>
9  );
10}

Uso

TSX
1import { FormattedMessage, FormattedNumber } from 'react-intl';
2
3<FormattedMessage id="home.titulo" />
4<FormattedNumber value={1234.56} style="currency" currency="EUR" />

Artículos Relacionados

Tags
next.js
react-intl
app-router
i18n
tutorial
formatjs
2026
IntlPull Team
IntlPull Team
Engineering

Building tools to help teams ship products globally. Follow us for more insights on localization and i18n.