HTML translate 属性

定义和用法

translate 是否应该翻译元素内容。

Test: Please click the Google Translate icon (next to the search button at the top of the page), switch to another language, and see what happens to the "ice cream" below:

Here, we use translate="no": ice cream.

See also:

HTML tutorial:HTML attributes

Example

It is specified that certain elements should not be translated:

<p translate="no">Don't translate this!</p>
<p>This can be translated to any language.</p>

Syntax

<element translate="yes|no">

Attribute value

Value Description
yes It is specified that the content of elements should be translated.
no It is specified that the content of elements should not be translated.

Browser support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Not supported Not supported Not supported Not supported Not supported