How to specify your webpage's language so Google Chrome doesn't offer to translate it

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?

Answers


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>

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.


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" />

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

BUT i have tried the following and it seem to work:

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

Cheers! Erwin Haantjes


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


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.


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")


Need Your Help

How many versions of the C++ Standards are there?

c++ standards c++-faq

In C there's C89, C99, and C11; what about C++? Is there any upgrade since it came out?