Status: Package release coming
Built and tested. Package release coming: not on npm yet.
Build translated pages into your Next.js export
Next.js can export plain HTML. Our build step reads your signed translation bundle and writes a translated copy of every page under /fr/, /de/ and so on.
Who it is for
- Teams that deploy a static export (output: 'export') and want real language URLs without a server.
- Sites that need translated HTML for search engines and link previews.
- Developers who want translations to be part of the build, reviewed in the deploy pipeline.
Honest limits
- Built and tested. Package release coming: the package is not on npm yet.
- It works on a static export. Next.js has no after-export hook, so it is a separate command run after the build.
- Translated copies are written as plain HTML without the Next.js runtime. In our tests, hydrating a translated page made React report a text mismatch and show the English text again, so we strip hydration by default. Fully interactive localized apps should use Next's own i18n routing; that path is not covered.
- If the bundle cannot be loaded, the build leaves your source pages untouched (a bad signature always stops the build).
- Tested against Next.js 15.5 and React 19; other versions are not verified.
How it works in 3 steps
Add the build step
Wrap the Next config with the ResilientLang helper and run the rl-next command after next build. Settings hold public values only; a secret key is refused.
Translate from a signed bundle
The build reads your published bundle from a folder or from HTTPS addresses tried in order. The signature is mandatory and every language file is checked against its checksum.
Ship plain HTML
Each page is written once per language with the right lang and dir attributes, reciprocal hreflang with x-default, canonical tags and links that stay inside the language folder.
Questions
Does it need your servers at build time?
It needs a published bundle. That can be a folder in your repository, and the package keeps the last verified bundle in a cache, so a build still works when every origin is down.
Will visitors need JavaScript?
No for the translated text, which is already in the HTML. The language switcher is plain links.
Does it work with server-side rendering?
Only pages exported as static HTML are translated by the build step. The package also has a function for translating HTML in a handler, but that route is not covered by a Next.js integration yet.
Is it on npm?
Not yet. The package is built and tested; the npm release is still to come.
Read more
- Client-Side vs Server-Side Translation for SEO
- hreflang Implementation: HTML Tags, Headers or Sitemap?
- Multilingual XML Sitemaps: hreflang, lastmod and Indexes
- Static Translation Bundles with CDN Failover Explained
See also: Static sites · Developers · SEO and hreflang · Pricing · Trust and security