अपने प्रश्न को पूछें और दस्तावेज़ का सारांश प्राप्त करें, इस पृष्ठ और आपके चुने हुए AI प्रदाता का उपयोग करके
संस्करण इतिहास
- "Init history"v9.0.013/6/2026
इस पृष्ठ की सामग्री एक AI द्वारा अनुवादित की गई है।
अंग्रेजी में मूल सामग्री के अंतिम संस्करण देखेंIf you have an idea for improving this documentation, please feel free to contribute by submitting a pull request on GitHub.
GitHub link to the documentationCopy doc Markdown to clipboard
Migrate from next-i18next to Intlayer
For a complete and detailed step-by-step tutorial, please see our full next-i18next Migration Guide.
Intlayer handles all Next.js Pages Router and App Router implementations transparently. Using the adapter lets you migrate your next-i18next implementation with zero code rewrite.
What to do
To begin, run:
कोड को क्लिपबोर्ड पर कॉपी करें
npx intlayer initThis creates the required Intlayer setup file. To swap to Intlayer behind the scenes, update your next.config.ts:
कोड को क्लिपबोर्ड पर कॉपी करें
import type { NextConfig } from "next";import { createNextI18nPlugin } from "@intlayer/next-i18next/plugin";const withIntlayer = createNextI18nPlugin();const nextConfig: NextConfig = {};export default withIntlayer(nextConfig);What it does under the hood
The createNextI18nPlugin composes Next.js's native behavior alongside the core next-intlayer plugin, injecting all required Webpack/Turbopack aliases for next-i18next, react-i18next, and i18next.
Under the hood:
serverSideTranslations&appWithTranslation: They now function as wrappers for Intlayer's internal loaders, circumventing large static JSON injection.- Client hooks: Delegates immediately to
@intlayer/react-i18nextretaining all formatting, plurals, and nested namespace features.