.html, .htm.
Source file
Save this example aslocales/en-US/messages.html.
Configure your files
Use thisi18n.yml for the example, or add its file mapping to your existing bucket.
See path templates for other layouts.
Translate
Install the CLI and setOPENAI_API_KEY in your
project’s .env.local or shell. You can also configure another
AI provider.
Behavior and limitations
-
Extracts visible element text with stable
html.*segment keys. - Inline tags are protected during translation and restored during writeback.
-
script,style, andheadcontent 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
- Check translations before committing generated files.
- Local translation workflow explains repeat runs.
- Browse all file formats.

