Install on a static site
If your generator writes plain HTML files, the static kit can translate them. It reads the finished site and writes a translated copy of every page in a language folder, such as /fr/.
What you need#
- The folder with your built site.
- A published bundle for your site, in a local folder.
- Your public key, your site address and your site key.
Run it#
The kit has a command-line tool, rl-prerender. The run command takes the input folder, the source language, your site address, the bundle folder, the public key, the loader address and the site key. The extract command lists the translatable strings of one page, which is handy to see what will be sent for translation.
What each translated page gets#
- The right
langand text direction. - A full set of hreflang links to all language versions, plus
x-default. - A canonical link to itself.
- The loader tag.
- Links to other pages rewritten to the same language, when those pages exist.
- An optional sitemap that lists every language version.
Options you may want#
- A minimum share of translated text. Pages below it are not written and get no hreflang. See Thin pages.
- Keep or remove framework scripts from translated copies.
- Skip some source files.
Strings with no translation stay in the source language. The report lists them so you can translate them next.
Running the command again on the same folder gives the same result.
Hosting#
Where you can set a content security policy depends on the host. Netlify and Cloudflare Pages document a _headers file; Vercel documents headers in vercel.json (checked 2026-10-29). GitHub Pages documents no way to set custom response headers or a policy: verify. Netlify can also inject a snippet before the closing head tag when serving, but not on proxied or function routes.
Not covered#
Pages made on demand are not prerendered. The kit is not published: OPEN.