开发者

return the active language of the Google Translate Web Element

开发者 https://www.devze.com 2023-03-29 13:27 出处:网络
I am using a dynamic shoppingcart running on javascript and cookies. I want to enable a language switcher for it, to switch some words (strings) that I have translated manually, using the hooks provid

I am using a dynamic shoppingcart running on javascript and cookies. I want to enable a language switcher for it, to switch some words (strings) that I have translated manually, using the hooks provided: simplecart. I also will be开发者_开发问答 using the Google Translate Web Element to machine translate the static content of the site.

Now rather then ending up with 2 dropdowns: one to switch the dynamic content, and one to switch the static, I would like to 'listen' to the GTWE, so my own translation switches to the selected, or auto detected language. How do I tap into the GTWE to get its current language to use in JS? Or is it not possible and should I be asking how to command the GTWE with my own dropdown for my translations.(the other way around)

0

精彩评论

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

关注公众号