@intl-ai/next
v0.7.0
Published
Next.js integration for the intl-ai binary: wraps next.config so translations run before the build (webpack and Turbopack)
Maintainers
Readme
@intl-ai/next
Next.js integration for intl-ai: wraps your next.config so the intl-ai binary translates locale files before the build, on webpack and Turbopack alike.
This package is a thin shim: all translation logic lives in the intl-ai binary (installed automatically as a dependency). Your project needs an intl-ai.toml config; see the getting started guide.
Install
npm install -D @intl-ai/nextUsage
// next.config.ts
import { withIntlAi } from "@intl-ai/next";
export default withIntlAi({
// your usual Next.js config
});Options for the translation step go in the second argument:
export default withIntlAi(nextConfig, {
failOn: ["missing", "invalid"],
dev: false, // skip during `next dev`
});Options
Same surface as @intl-ai/unplugin: fill, failOn, validate, judgeThreshold, dev, config, cwd, bin, args.
