2

So I have written a page, but keep getting prompted to translate the page into English (From Indonesian). It's already in English so I don't know what's going on. I have searched around and tried a bunch of fixes, but none of them seem to work.

I included this stuff in my head:

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta charset="UTF-8" />
    <meta name="google" value="notranslate" />
    <meta http-equiv="Content-Language" content="en" />
    <meta name="viewport" content="width=1000" />  
    .
    .
    .

In an effort to counteract the translation stuff. Unfortunately, this does not work. Is anyone aware of what might be causing this behavior? I really wish we could just hide the translation bar using CSS, but alas, Google got wise and changed the structure so it's not a div in the page... Any help would be awesome.

Thanks!

gabaum10
  • 3,769
  • 3
  • 48
  • 89
  • Did you try ``? This seems related: http://stackoverflow.com/questions/2980520/how-to-specify-your-webpages-language-so-google-chrome-doesnt-offer-to-transla. – pimvdb Jul 06 '12 at 14:59
  • Yeah, Chrome seems to ignore that as well... – gabaum10 Jul 06 '12 at 14:59

2 Answers2

3

It's "content", not "value":

<meta name="google" content="notranslate" />
Pointy
  • 405,095
  • 59
  • 585
  • 614
  • 1
    [The docs](http://support.google.com/translate/#2641276) state otherwise, though. – pimvdb Jul 06 '12 at 14:56
  • 1
    Alas, neither of those worked. It's strange, I can add that, and it does not display when the page first loads; however, after navigating away from the page, it pops down. Very strange. – gabaum10 Jul 06 '12 at 14:58
  • Yes, so it hides it when on the initial load. When you navigate away to ANY other page, it will slide down. – gabaum10 Jul 06 '12 at 15:01
  • @gabaum10 what do you mwan by "ANY other page"? Another page in your domain, or any other page on the Internet? The `` tag isn't intended to declare the "notranslate" for your entire site - it's a per-page flag. – Pointy Jul 06 '12 at 15:02
  • Well, my page is constructed through a JSP/JSPF structure, so the meta tag is in a header.jspf file (included in every page). And it's any other page on my domain. It does not do that whilst hitting an external domain (tried google.com) – gabaum10 Jul 06 '12 at 15:05
  • 1
    @pimvdb yes, but the HTML5 spec says that there's no "value" attribute for `` tags. – Pointy Jul 06 '12 at 15:06
  • So, after clearing the cache, rebuilding my project and rerunning the app, some combination of the things mentioned solved the problem. I am really not sure which one it was. I am going to try to isolate exactly which solution was the right answer. – gabaum10 Jul 06 '12 at 15:07
  • I believe changing it to "content" did the trick. I removed the other crap I tried and it still solved the problem. Apparently there was some caching that needed to be cleared for it to take effect. Thanks for the help boys. – gabaum10 Jul 06 '12 at 15:10
0

If you have control over the server response, you can send a Content-Language response header that Chrome will honor. For example:

I think you said you were using JSP:

response.setHeader("Content-Language, "en");

Here it is for ASP.Net:

Response.AddHeader("Content-Language", "en");

etc...

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575