Вопрос

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!

Это было полезно?

Решение

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>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top