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

dreeves picture dreeves · Jun 5, 2010 · Viewed 36.2k times · Source

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?

Answer

Marshall Anschutz picture Marshall Anschutz · Jan 13, 2012

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>