How to specify your webpage's language so Google Chrome doesn't offer to translate it

前端 未结 7 564
心在旅途
心在旅途 2020-12-01 04:03

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 i

相关标签:
7条回答
  • 2020-12-01 04:38

    remember to open the page in a new tab or a new window after insert

    <meta name="google" value="notranslate">
    

    otherwise it looks not work, but it actually works well.

    0 讨论(0)
  • 2020-12-01 04:41

    You guys should be referencing http://support.google.com/webmasters/bin/answer.py?hl=en&answer=79812 and not guessing what works

    <meta name="google" content="notranslate" />
    
    0 讨论(0)
  • 2020-12-01 04:42

    I have success with <meta name="google" content="notranslate" />

    0 讨论(0)
  • 2020-12-01 04:47

    On an older version of Chrome (18.x), the Content-Language meta tag seems to have no effect on the translation popup, unless it is lowercased:

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

    (to be clear --http-equiv="Content-Language" did not work; neither did name="content-language")

    0 讨论(0)
  • 2020-12-01 04:54

    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.

    0 讨论(0)
  • 2020-12-01 05:01

    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>
    
    0 讨论(0)
提交回复
热议问题