How to disable google translate from html in chrome

被刻印的时光 ゝ 提交于 2019-11-27 05:09:43

问题


I just made a website for a french restaurant. The website is in english, but I guess there is enough french on the website (labeled pictures of menu items) to prompt the visitor to translate the website if using Chrome.

Is there something I can add to the html to prevent chrome from asking to translate the page? I'd assume it'd be something like <html lang="en"> but that doesn't work.

Any ideas?

Thanks


回答1:


Add this tag in between <head> and </head>:

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

Documentation reference




回答2:


The meta tag in the <head> didn't work for me, but

class="notranslate"

added to a parent div (or even <body>) did work and allows more precise control of the content you don't want to be translated.



来源:https://stackoverflow.com/questions/12238396/how-to-disable-google-translate-from-html-in-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!