ptt / pttweb

PTT BBS Web Frontend
http://www.ptt.cc/bbs/
MIT License
211 stars 30 forks source link

Figure out how to get Google Translate to detect non-English language for in-browser translation #8

Open patcon opened 5 years ago

patcon commented 5 years ago

On mobile and desktop, Google Translate in Chrome only asks to translate on certain pages, like this one:

screen shot 2018-10-24 at 10 54 35 am

On others, it doesn't. Note the lack of translation icon on the right of the browser url bar:

screen shot 2018-10-24 at 10 52 18 am

This isn't such a problem on desktop, where I can just right click anywhere on the page and select "Translate to English". But on mobile, there's no way to translate the whole page unless the browser detects it.

Would be rad to figure out how Chrome decides to ask, and ensure all pages have the chance :)

Thanks!

patcon commented 5 years ago

Found it: https://stackoverflow.com/questions/2467454/why-does-chrome-incorrectly-determine-page-is-in-a-different-language-and-offer

PR incoming

patcon commented 5 years ago

Ready for review, but not tested due to missing templates