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

BrowserInternationalizationCross BrowserGoogle ChromeTranslation

Browser Problem Overview


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?

Browser Solutions


Solution 1 - Browser

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>

Solution 2 - Browser

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.

Solution 3 - Browser

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

Solution 4 - Browser

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!

Solution 5 - Browser

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

Solution 6 - Browser

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.

Solution 7 - Browser

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestiondreevesView Question on Stackoverflow
Solution 1 - BrowserMarshall AnschutzView Answer on Stackoverflow
Solution 2 - Browser2ndkauboyView Answer on Stackoverflow
Solution 3 - BrowserJason JongView Answer on Stackoverflow
Solution 4 - BrowserCodebeatView Answer on Stackoverflow
Solution 5 - BrowserAdrianView Answer on Stackoverflow
Solution 6 - Browseruser1283182View Answer on Stackoverflow
Solution 7 - BrowserhumbletimView Answer on Stackoverflow