Atrybut tłumaczenia HTML


Przykład

Określ, że niektóre elementy nie powinny być tłumaczone:

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


Definicja i użycie

Atrybut określa , translateczy zawartość elementu powinna być tłumaczona, czy nie.

Test: kliknij obraz tłumaczenia Google (obok przycisku wyszukiwania u góry strony), aby zmienić na inny język, i zobacz, co dzieje się ze słowem „lody” poniżej:

Tutaj używamy translate="no":ice cream.


Obsługa przeglądarki

Attribute
translate Not supported Not supported Not supported Not supported Not supported

Składnia

<element translate="yes|no">

Wartości atrybutów

Value Description
yes Specifies that the content of the element should be translated
no Specifies that the content of the element must not be translated

Powiązane strony

Samouczek HTML: atrybuty HTML