CKTIS / HTML
HTML term or value: translate
The `translate` attribute specifies whether an element’s text and translatable attribute values are to be changed during localization; its normative states are `yes` and `no`.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<section translate="no">…</section>The empty value and the yes keyword enable translation, while no disables it. A missing or invalid value inherits the parent state, and a root without a declaration permits translation by default.
The state covers text nodes and attributes defined as translatable, including title, alt, and placeholder. It does not make the browser immediately translate the page; it is an instruction for localization tools and workflows.
Apply translate="no" as narrowly as possible to brand names, code, identifiers, or data whose alteration would break meaning. It does not replace a lang declaration, access control, or protection against reading the content.
The example reports translate as false on the parent and inheriting child, an explicit true override on the second child, and raw null where the attribute is absent.
Examples
<!doctype html><meta charset="utf-8"><section id="p" translate="no"><span id="x">Brand</span><span id="y" translate="yes">Translate me</span></section><output id="result"></output><script>result.textContent=`parent=${p.translate}; inherited=${x.translate}; override=${y.translate}; childRaw=${x.getAttribute("translate")}`;</script>Result
parent=false; inherited=false; override=true; childRaw=null
The executed example verifies inheritance of the no-translation state and a valid restoration of yes in a nested passage.