May 17, 2018

Sreekanth B

How To Prevent Google Mistakenly Offering To Translate a Page 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?

The new Google Chrome auto-translation feature is tripping up on one page within one of our applications. Whenever we navigate to this particular page, Chrome tells us the page is in Hindi and offers to translate. The page is in English. One particular page that has a few dozen form fields with English labels. I have no idea why Chrome thinks this page is Hindi.
How To Prevent Google Mistakenly Offering To Translate a Page Language

<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 :