free4ride
free4ride

Reputation: 1643

Specify HTML DOM nodes for Google page translation (opposite of class=notranslate)

I know you can tell google translate not to translate some sections by using class="notranslate", but can you tell google to translate only specific sections and not the rest?

If not, any alternatives?

Upvotes: 1

Views: 356

Answers (2)

free4ride
free4ride

Reputation: 1643

<body class="notranslate">
    <p class="translate">Will be translated</p>
    <p>Will not be translated</p>
</body>

worked for me

Upvotes: 0

Selfish
Selfish

Reputation: 6200

Use the attribute translate="", and specify on body. Then inside, specify what nodes to translate. For example:

<body translate="no">

    <p translate="yes">Will be translated</p>
    <p>Will not be translated</p>

</body>

Upvotes: 1

Related Questions