docs

Keep product text and code separate

Linguana translates words your users read. It leaves code, identifiers, URLs, analytics values, and hidden content alone.

Leave code unchanged

<code data-no-translate>checkout_v2</code>

Use data-no-translate for a complete subtree that should stay unchanged.

What is left alone automatically

  • script, style, code, and pre subtrees.
  • hidden, aria-hidden="true", and hidden inputs.
  • Any subtree marked data-no-translate.
  • IDs, class names, names, roles, URLs, sources, actions, methods, test IDs, analytics values, and event attributes.
  • URL-like and machine-readable text patterns.
<section data-no-translate>
  <code>npm install example</code>
</section>

Translate a custom label

Unknown literal attributes can be opted in by name:

<Widget data-translate="emptyLabel" emptyLabel="No results" />

Prefer a normal user-facing prop or t() when you control the component.

Use <T> for text that contains a link, emphasis, or another component. See Translate dynamic text and links.

Verify

Run your normal build and check that product text appears while code and identifiers stay out of .linguana/manifest.json.

Failure and next

If expected text is missing, use Build diagnostics. For focused extraction tests, see Advanced testing.

Did this page get you to a working result?

On this page

No Headings