Reputation: 824
In HTML, you can direct translation services not to translate certain HTML elements by adding class="notranslate" to them (source).
Is there any method to create the opposite behavior? Such that you can mark the elements that should be translated, and only those will be?
Upvotes: 1
Views: 725
Reputation: 6200
You can use the class notranslate
on your body.
Then, use the same method with inner nodes using the class translate
.
<body class="notranslate">
<p class="translate">Will be translated</p>
<p>Will not be translated</p>
</body>
Upvotes: 2