Skip to main content
HTML combines visible page content with markup. Hyperlocalise translates supported text while protecting document structure. Review the rendered page as well as the text diff. Supported extensions: .html, .htm.

Source file

Save this example as locales/en-US/messages.html.

Configure your files

Use this i18n.yml for the example, or add its file mapping to your existing bucket. See path templates for other layouts.

Translate

Install the CLI and set OPENAI_API_KEY in your project’s .env.local or shell. You can also configure another AI provider.
The dry run previews the work. The second command writes translations to the configured target path and updates the lockfile.

Behavior and limitations

  • Extracts visible element text with stable html.* segment keys.
  • Inline tags are protected during translation and restored during writeback.
  • script, style, and head content are excluded. Comments and whitespace-only text are preserved.
  • Translates element text; do not assume every attribute is a translatable field. Review the rendered result.

Next steps