The translate attribute indicates whether the element’s content and attribute values should be translated or not.
Applies to [HTMLElement](/dom/HTMLElement)Two values allowed: "yes" and "no". The information will be inherited. When no translate flag is set, "yes" is default.
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
Using HTML’s translate attribute
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4