Appearance
Are you an LLM? You can read better optimized documentation at /guide/build-systems/next-js.md for this page in Markdown format
Next.js
Next.js 15+ defaults to Turbopack. Use @intl-ai/next to register the Turbopack loader. For Next.js 14 with webpack only, use @intl-ai/unplugin/webpack directly.
Installation
sh
npm install @intl-ai/nextsh
pnpm add @intl-ai/nextsh
yarn add @intl-ai/nextsh
bun add @intl-ai/nextConfiguration
Create an intl-ai.config.ts at your project root. See Configuration for the full schema.
typescript
import withIntlAi from "@intl-ai/next";
export default withIntlAi({
reactStrictMode: true,
});No changes to your app code required. Translations are generated at build time with zero runtime overhead.
Next.js 14 (webpack only)
If you are on Next.js 14 with webpack, use @intl-ai/unplugin/webpack directly:
typescript
import intlAiWebpackPlugin from "@intl-ai/unplugin/webpack";
export default {
webpack(config) {
config.plugins = config.plugins || [];
config.plugins.push(intlAiWebpackPlugin());
return config;
},
};Pair with an i18n library from i18n libraries.