translate
Summary
The translate attribute indicates whether the element’s content and attribute values should be translated or not.
Applies to | [HTMLElement](/dom/HTMLElement) |
---|
Some automated translation services apply “no” to elements like the code element.
Elements with translate attributes of different values may be nested to indicate a chunk of text that should be translated within a container that should not be translated, or vice versa.
Overwriting “no” with “yes” is not widely supported by translation services yet.
Examples
<p>The national motto of France is
<i lang="fr" translate="no">Liberté, Egalité, Fraternité</i>
(freedom, equality, brotherhood).</p>
<code translate="no">
<section id="translate-attribute">
<h2><span translate="yes">The <span translate="no">translate</span> attribute<h2>
<p><span translate="yes">The <span translate="no">translate</span> attribute indicates whether the element’s content and attribute values should be translated or not.</span></p>
</section>
</code>
Related specifications
- HTML5
- W3C Recommendation