57

I have a page that Google Chrome insists on thinking is in French. Here's a snapshot of it:

http://yootles.com/outbox/overcleverchrome.html

Note that I'm including a meta http-equiv tag to tell it that it's in fact in English:

<meta http-equiv="Content-language" content="en">

But it doesn't help. Is there anything else I can do to prevent this?

dreeves
  • 26,430
  • 45
  • 154
  • 229
  • 1
    I agree this translator is a hassle, each time i need to click to close it down it reminds me of the silly MS Assistants in MS Office which make everybody on nerve :( – user310291 Jun 05 '10 at 14:16
  • 2
    See my answer below, add class="notranslate" to the body tag instead – Codebeat Jan 13 '12 at 16:35
  • 1
    I have the same problem. In my eyes, it is a Chrome bug: If the lang attribute is specified in an HTML 5 page, it should define the language of the element. I will ignore the Chrome message until they have fixed it in some months or so. I will surely not add some Google-specific code into the document only to make this bug disappear. – rplantiko Jun 25 '13 at 08:18
  • 1
    This may not be a good solution for everyone, but I had this problem on a page that consisted entirely of tables of data. I added a few English sentences describing the data, and the problem went way. The "notranslate" option also worked for me, but I don't want to limit what Google can do with the page, only stop it from misunderstanding the language for the page. So I was happy just adding some description, which probably should have been there all along anyway. – ccalvert Jan 14 '19 at 19:13
  • @ccalvert Great point, that should probably be the first thing to try! – dreeves Jan 15 '19 at 21:16

8 Answers8

43

Google Chrome currently requires several tags to make an (HTML5) document opt out of translation. Before doing this, you should be sure that you know your audience's language, as otherwise it will prevent foreign sites from properly translating your site.

The relevant tags are:

<meta charset="UTF-8" />
<meta name="google" content="notranslate" />
<meta http-equiv="Content-Language" content="en_US" />

And here is a full example:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="google" content="notranslate" />
  <meta http-equiv="Content-Language" content="en_US" />
 </head>
 <body>
  Dies ist ein Test Deutsch
 </body>
Dave
  • 10,748
  • 3
  • 43
  • 54
Marshall Anschutz
  • 1,200
  • 1
  • 12
  • 23
  • 1
    I can confirm this doesn't work. The meta tags only account for a small weight it google's translating algorithms. – Hamer Jul 18 '12 at 18:33
  • 2
    See above, content should be "en_US" – justingordon Apr 06 '13 at 22:26
  • What about other search engines, like Bing? – marko Apr 08 '15 at 12:49
  • 3
    Seems like OP didn't want to disable translation entirely, but rather to specify the language so that it's not misinterpreted by google translate. – James Gentes Feb 02 '16 at 18:59
  • Which is the correct one `content="notranslate"` or `value="notranslate"` ? In your answer I see `content` but in another answer on this page I see `value` – Sam Apr 07 '21 at 12:34
8

I found a post which might help you: http://www.blogsdna.com/4593/how-to-stop-google-from-translating-your-website-or-webpage.htm

You can either use a meta tag:

<meta name="google" value="notranslate">

Or you can use a class:

<span class="notranslate"></span>

I hope that answered your question.

EDIT: I Just checked my blog which I offer in German and English. On each language version Chrome doesn't ask me for translation: http://kau-boys.de

I checked my source code and the multilanguage plugin only included this code:

<meta http-equiv="Content-Language" content="en_US" /> 

So maybe your locale needs to have a subregion, like US in this example.

cjstehno
  • 13,468
  • 4
  • 44
  • 56
2ndkauboy
  • 9,302
  • 3
  • 31
  • 65
7

You guys should be referencing http://support.google.com/webmasters/bin/answer.py?hl=en&answer=79812 and not guessing what works

    <meta name="google" content="notranslate" />
Jason Jong
  • 4,310
  • 2
  • 25
  • 33
7

Adding <meta name="google" value="notranslate"> (not W3C by the way) or <meta name="google" content="notranslate"> doesn't avoid the annoying translate popups.

BUT I have tried the following and it seems to work:

You can avoid translation of the page by adding class="notranslate" to the <body> tag!

walen
  • 7,103
  • 2
  • 37
  • 58
Codebeat
  • 6,501
  • 6
  • 57
  • 99
  • Can confirm this is the only option that seems to work for me (Angular web app). Adding the meta tags in the main page does nothing, only changing the body class worked. – walen Feb 25 '21 at 11:35
1

remember to open the page in a new tab or a new window after insert

<meta name="google" value="notranslate">

otherwise it looks not work, but it actually works well.

user1283182
  • 131
  • 3
1

On an older version of Chrome (18.x), the Content-Language meta tag seems to have no effect on the translation popup, unless it is lowercased:

<meta http-equiv="content-language" content="en" />

(to be clear --http-equiv="Content-Language" did not work; neither did name="content-language")

humbletim
  • 1,128
  • 11
  • 10
1

I have success with <meta name="google" content="notranslate" />

Adrian
  • 804
  • 7
  • 3
0

You can add translate="no" to your html tag too.

<html translate="no">
  <head></head>
  <body></body>
</html>

Note that this disables all translation functionality altogether. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/translate)

Farzad Soltani
  • 377
  • 7
  • 19