How do you tell if Google translator is active?
I'm adding Google Translate links to my website, but I want to run some JavaScript based on the current language being viewed. Using JavaScript, is there a way to determine the following:
Is the site currently being viewed through the Google Translate frame?
If so, can I tell which language is开发者_如何学编程 being viewed?
No, its built into Chrome and just wraps your site so you will have no idea. You can check the HTTP Accept-Language header to see what region they are coming from so you can localize it, but thats about it.
精彩评论