March 28, 2018

Sreekanth B

Why Browser Incorrectly Determine Website Page Is In a Different Language

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

How can I prevent Google mistakenly offering to translate a page?

Several of my website pages are appearing in search results with [Translate this page] next to it. When I click that it takes me to Google Translate and translates my page "from Hindi to English".

The pages are in English but have a couple of local words (actually In Hindi) that appear to be tripping Google up.

A few weeks ago I set the html tag to <html lang="en"> which from research appears to be the best method to specify the language of a document. Google has cached the pages with this attribute but it is still offering to translate.

More research led me to a "notranslate" attribute which prevents translation entirely:

<html lang="en" class="notranslate">.

The problem now is users cannot translate from English to their desired language!

Are there any other solutions that force Google to parse my site as English only?

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

If that doesn't work, you can always place a bunch of text (your "About" page for instance) in a hidden div. That might help with SEO as well.

There are generally three ways to accomplish this for other browsers:

1. W3C recommendation: Use the lang and/or xml:lang attributes in the html tag:
<html lang="en" xml:lang="en" xmlns= "">

2. Google recommendation: meta http-equiv (as described above):

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

3. Use HTTP headers (not recommended based on cross-browser recognition tests):

HTTP/1.1 200 OK
Date: Wed, 05 Nov 2003 10:46:04 GMT
Content-Type: text/html; charset=iso-8859-1
Content-Language: en

Subscribe to get more Posts :