Moondrop, this should work, as Google sets cookies to detect language changes. Can you provide a link to your website?
Also, sometimes this is an issue when you are not using the correct default langauge. Something to consider.
I will do my best to solve this issue for you.
Rob
Hi Rob, apologies for not replying to this sooner. I must have missed the reply email notification.
Unfortunately, I can not send you a link yet, as the site is still in development locally. However, even when I even set a click event to .goog-te-combo (the <select>‘s class) or .skiptranslate nothing happens. If I set it on #google_language_translator the click event works.
The default language is set to English as well.
You mentioned that Google uses cookies to detect language changes. Do you have any advice as to how to detect this change with JavaScript?
Thanks for the reply and help!
Hi Moondrop, I’m guessing this might be happening because the Google functionality loads up after everything (even jQuery) loads on the page. That is why you see a pause after your page loads, so jQuery seems to be of no use on certain elements.
Now for my sales pitch….haha.
The premium version of Google Language Translator uses a custom drop-down to access languages, which means that ids, classes, and other elements are loaded with the page immediately.
You could try and re-build the translator from scratch by accessing Google functionality yourself. There are some great pieces of code on Stack Overflow that show you how to do this, but it’s probably worth your time to purchase the $12 plugin, and then you will have access to it immediately. I’m finding that this is the real value in my plugin, besides that fact that it has a nice design. It’s more about what you are able to do with it, because it provides more control.
Here is the premium version here, and you can see I use a ton of jQuery here, combined with Cookies to access languages. I hear too that you can even “grab” Google’s cookies to using jQuery as well, although I have not tried it yet. I would like to do this, so that I do not use my own cookies, which makes my current process unnecessary, However, this is not a huge issue, I’m just being picky towards my own plugin.
Anyway, let me know if this helps.
http://www.wp-studio.net/how-it-works/
Thanks so much for using the plugin.
Rob
Hi Moondrop, I’m going to close this thread since it has been a month. This does not mean you cannot post here though….please update me on the solution you have found for this.
Hopefully you are still using the plugin.
Thanks, Rob