The problem is that I am creating a chrome extension that adds an editable div to the web pages, but when the chrome translator translates the pages, the content of the div is also translated. I have to avoid this behavior so I need a way to skip the translation only on that div. e tried placing the attribute lang="es"
to the div. but it does not work.
HTML
<div lang="es" class="paper" id="paperEx1" contenteditable="true" style="color: black;">Aqui el usuario puede escribir</div>
What you could do is use the CSS class called
notranslate
Google Chrome's text translator, it's a class to prevent it from translating that particular text.Example applying it yourself
div
:(Now if you use Google Chrome translate on the page it won't translate the text with the class applied)
Example applying it to an element
p
: