Status: Package release coming

Built and tested. Package release coming: not on npm yet.

Translate your Astro build output

Astro already ships plain HTML, which suits build-time translation. The integration runs when the build is done and adds a translated copy of every page.

Create an account See pricing

Who it is for

  • Astro sites on static hosting that want language URLs.
  • Content and documentation sites where most pages are fixed text.
  • Developers who want translations in the build, not in the visitor's browser.

Honest limits

  • Built and tested. Package release coming: the integration is not on npm yet.
  • For output: 'server', only prerendered pages are translated.
  • Astro islands that hydrate can mismatch if their text was translated. Mark such islands translate="no" or strip hydration.
  • Tested against Astro 5.18; other versions are not verified.

How it works in 3 steps

  1. Add the integration

    Add resilientLang() to your Astro config with the source language, your bundle location and the public key. Your site setting becomes the site URL.

  2. Run astro build

    When the build finishes, the integration reads the signed bundle (signature mandatory, checksums verified) and translates the prerendered pages.

  3. Deploy

    Each language folder has lang and dir attributes, reciprocal hreflang with x-default, canonical tags and links that stay in the language.

Questions

Does it work with server rendering?

Only for pages that are prerendered. Pages rendered on demand are not translated by this step.

What about interactive components?

Islands hydrate only their own part of the page, so most translated pages are fine. If an island's text is translated it can mismatch; mark it translate="no" or strip hydration.

Is it on npm?

Not yet. It is built and tested; the npm release is still to come.