.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
-
Keys are dotted tag paths, like markdown slots:
html.body.h1,html.p,html.p.strong,html.p.strong.2,html.body.img.alt. The first occurrence of a path has no suffix. -
Inline tags start a new segment. For
<p>Open <strong>your project</strong> to get started.</p>the keys arehtml.p(Open),html.p.strong(your project), andhtml.p.2(to get started.). Punctuation-only text and entity-only cells such as are skipped. Tags stay in the file around those text nodes. -
script,style,pre, andheadcontent are excluded, including<title>. Comments and whitespace-only text are preserved. -
<img alt="...">is extracted ashtml.*.img.alt. Do not assume every attribute is translatable. Review the rendered result. -
hl entries page.html --import-settings settings.jsonapplies extra HTML filters.html.excludedElementsnames more tags to skip.html.icuSubfiltermarks ICU-shaped values.
Next steps
- Check translations before committing generated files.
- Local translation workflow explains repeat runs.
- Browse all file formats.

