开发者

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:

  1. Is the site currently being viewed through the Google Translate frame?

  2. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜