3

I have this page with book titles and author names. I'd like those two elements to remain untouched when the user accepts google proposal to translate the page.

How do I tell google translate to avoid certain elements of the page?

yPhil
  • 8,049
  • 4
  • 57
  • 83
  • 3
    http://stackoverflow.com/questions/9628507/how-can-i-tell-google-translate-to-not-translate-a-section-of-a-website – pawel Oct 05 '15 at 11:16
  • 1
    @pawel Yes, I marked my question (witch did not come up in my searches or in the Q title input field) as dupli. myself :) – yPhil Oct 05 '15 at 12:58

2 Answers2

7

add class to your element notranslate

eg:

<div class="notranslate set_bold_text"> lorem epsom</div>
</br>
<div class="set_bold_text" > lorem epsom</div>

the above div wont be affected to translation to your selected language but the below div will be translated

dhpratik
  • 1,100
  • 4
  • 19
  • 43
4

Two options to try:

  • either add class=notranslate to the element
  • or HTML5 translate="no" attribute

As per: http://www.w3schools.com/tags/att_global_translate.asp

TomD
  • 781
  • 4
  • 17