Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Several of my site's 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 Catalan to English".

The pages are in English but have a couple of foreign words (actually Japanese romanisations, not Catalan) 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?

share|improve this question

4 Answers 4

up vote 13 down vote accepted

Google does not use language meta-data since we've found that it's generally incorrect. Using HTTP headers, HTML meta tags or element-level lang-attributes does not have an impact on Google's language recognition, so unless you want to do that for other purposes (eg screen-readers), you can probably skip on that.

One thing to keep in mind is that Google has no problem recognizing multiple languages per page. So even if we should recognize that a part of the page is say in Italian (perhaps when you write about Italian hotels), and we show a "translate this page" link in the search results, we'll probably still be able to recognize that it's mostly in English. A simple way to check that is to use the advanced search options to select a specific language and do a site:-query for your site.

share|improve this answer
1  
Great insight John, thanks. So you're saying there's no way to stop Google showing [Translate this page]? My pages do appear in the English-only advanced search. My main concern is users - showing the translation link implies the entire page is in a different language. Personally I tend to avoid those links when I see them. There are also other sites using the same words that don't get the translation link... –  DisgruntledGoat Nov 5 '10 at 17:16
1  
That's correct - at the moment there's no way to make the "Translate this page" link disappear from the webmaster's side. I'll pass your feedback on to the team though, maybe that's something they can consider for the future. –  John Mueller Nov 5 '10 at 18:08
2  
Thanks @John. The main problem is that Google believes the pages are in Catalan, when they are not. I'm surprised that Google completely ignores the language tag - why not at least use it as a hint? –  DisgruntledGoat Nov 16 '10 at 12:49
    
Is there any update on this as I have seen people here and there on the internet asking the same question and in some instances causing a never-ending loop - superuser.com/questions/326938/… –  CodeBlend Aug 23 '11 at 14:20
4  
Anecdotally, I have to add that I have personally seen this (in Chrome for Windows) when I'm in PHPMyAdmin where Google thinks the page is in Italian and offers to translate. It's always struck me as bizarre considering I've never noticed any non-English words in PHPMyAdmin. –  huzzah Jun 20 '12 at 16:56

You should add the meta tag

<meta http-equiv="content-language" content="en" />

You could also send the Content-Language HTTP header from the server if you have access to it.

More info at http://www.w3.org/International/questions/qa-http-and-lang

share|improve this answer
2  
Or set the header using Apache: Header set content-language "en" –  John Conde Nov 4 '10 at 22:03
    
@John, yep. (that is what i meant that he can send the http header from the server) –  Gaby Nov 4 '10 at 23:28
    
Hmm, well supposedly using <html lang="en"> is better than that meta tag, but I will give it a try and see what happens :) –  DisgruntledGoat Nov 5 '10 at 2:12
    
I've had the same problem and I've verified this works for me in Chrome 19 dev –  Olly Feb 16 '12 at 22:59
    
<html lang=en> did not fix it for me, but the 'content-language' meta tag did. –  chovy May 20 '13 at 22:05

use this meta to skip the Google's translate

<meta name="google" content="notranslate" />
share|improve this answer
1  
This was actually submitted as an answer previously, then deleted by the owner without explanation. @danlefree is there a reason this isn't valid? It still appears on a recently-updated Webmaster Tools help page. –  Su' Jun 20 '12 at 20:06
    
@Su': according to the google webmaster the google translate should be skipped. and its works for my site. –  krish Jun 20 '12 at 21:29
    
@krish doesn't that do what I mention in the question and prevent all translation by users? –  DisgruntledGoat Jun 21 '12 at 16:06
    
This might be totalitarian. If the user's language is different than content-language meta tag, you would probably want a language translation. –  chovy May 20 '13 at 22:06

You may be able to look at the request Accept-Language header to dynamically add/remove the class="notranslate" attribute when the language string includes en.

According to Web Master World you can apply class="notranslate" to only the content it affects (i.e. the 'couple of foreign words') and hopefully avoid the English/English translate box.

share|improve this answer
    
But if they wanted to translate from English to another language, then it would be fetched by Google, not the browser, and presumably Google would use "English" in the accept-language header. –  Lèse majesté Nov 4 '10 at 22:41
    
Google usually does use English for google.com, google.co.uk, etc however what about the crawler for google.de, etc? But regardless, selective use of the class seems the best way out of this. –  Metalshark Nov 5 '10 at 6:18

protected by dan Apr 11 at 5:56

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.