Question

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!

Was it helpful?

Solution

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top