Disable Chrome translation bar on my website

前端 未结 4 921
花落未央
花落未央 2020-12-02 08:35

I have a chat website that is highly dynamic and when visiting it with Google Chrome, the translation bar appears offering to translate the site. While the translation of d

相关标签:
4条回答
  • 2020-12-02 09:12

    Insert this to the head section of your web page.

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

    Source: Meta tag that Google understand - Search Console Help

    0 讨论(0)
  • 2020-12-02 09:15

    If you add the following code

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

    inside <head></head> it will disable the appearence of the translation bar, but will also disable translation at Google Translate.

    For more info check http://support.google.com/translate/?hl=en#2641276.

    0 讨论(0)
  • 2020-12-02 09:16

    The Meta Value should be "content", not "value"

    <meta name="google" content="notranslate" />
    

    Update: I understand that normal meta tags use content to assign the value, however this is a rare case where "value" is actually the correct syntax. i.e. is confirmed to remove the translate bar.

    0 讨论(0)
  • 2020-12-02 09:17

    If you want to block a section (ie: for the original question just the chat window) you can use

      class=notranslate
    

    From: http://support.google.com/translate/?hl=en#2641276. If you don't mind your web page being translated by Google Translate, except for a particular section (like an email address, for example), just add class=notranslate to any HTML element to prevent that element from being translated. For example:

    Email us at <span class="notranslate">sales at example dot com</span>
    
    0 讨论(0)
提交回复
热议问题