Pregunta

I want my users to be able to use Chrome's built in translator, but I don't want it to translate certain values such as usernames, email addresses, filenames, other nouns, etc.

Is there an attribute I can stick on elements that I do/don't want to be translated?

Thanks!

¿Fue útil?

Solución

I've answered my own question after doing some digging around.

Chrome translate will ignore all elements with class 'notranslate'.

For example, given the following code:

<strong>Don't translate me</strong>

Adding this will force chrome to ignore it:

<strong class="notranslate">Don't translate me</strong>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top