Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 481
dreeves Avatar asked Jun 05 '10 13:06

dreeves


People also ask

Which language Cannot be translated by Google?

Aramaic - 500.000 - 850.000 native speakers It was used in large sections of the biblical books of Daniel and Ezra, and also one of the languages of the Talmud. Today, almost 2 million people who live in the Middle East speak Aramaic, but Google Translate is yet to make available for online translation.

Why does Chrome incorrectly determine page is in a different language and offer to translate?

There are several reasons as to why Chrome may fail to translate foreign websites. It could be due to improperly configured language settings, conflicts with extensions, or an outdated web cache.


2 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> 
like image 199
Marshall Anschutz Avatar answered Sep 19 '22 14:09

Marshall Anschutz


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.

like image 40
2ndkauboy Avatar answered Sep 20 '22 14:09

2ndkauboy