Why does Chrome incorrectly determine page is in a different language and offer to translate?

前端 未结 6 1690
夕颜
夕颜 2020-11-29 17:11

The new Google Chrome auto-translation feature is tripping up on one page within one of our applications. Whenever we navigate to this particular page, Chrome tells us the

6条回答
  •  醉梦人生
    2020-11-29 18:10

    I added lang="en" to the doctype declaration, added meta tags for charset utf-8 and Content-Langauge in the HTML header, specified charset as utf-8 and Content-Language as en in the HTTP response headers and it did nothing to stop Chrome from declaring my page was in Portuguese. The only thing that fixed the problem was adding this to the HTML header:

    
    

    But now I've prevented users from translating my page that is clearly in English to their own language. Poor job, Chrome. You can be better than this.

提交回复
热议问题