IntlPull
Tutorial
12 min read

Next.js App Router mit react-intl: Vollständiges i18n-Tutorial 2026

Lernen Sie, wie Sie react-intl (FormatJS) in Next.js App Router einrichten. IntlProvider, FormattedMessage und Sprachwechsel.

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

Lernen Sie, wie Sie react-intl (FormatJS) in Next.js App Router einrichten. IntlProvider, FormattedMessage und Sprachwechsel.

Schnelle Antwort

Um react-intl mit Next.js App Router zu verwenden: Installieren Sie react-intl, erstellen Sie Nachrichtendateien im ICU-Format und umwickeln Sie Ihre App mit IntlProvider.


Setup

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

messages/de.json:

JSON
1{
2  "home.titel": "Willkommen in unserer Anwendung",
3  "home.items": "{count, plural, =0 {Keine Artikel} one {# Artikel} other {# Artikel}}"
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}

Verwendung

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

Verwandte Artikel

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.