Who you gonna call? DogTranslate();
-
What is the javascript function to call to switch to a language? I had thought it was doGTranslate.
I do not want to use the default switcher produced by the plugin’s shortcode. I need a button that toggles from English to Chinese.
The button is labeled “Chinese” in Chinese, so when you click it, it switches to the Chinese page.? ?On that page is a button that is labeled “English” in English, and when you click that, it switches to the English page.?
I was thinking I could do something like this (where I have the Chinese button with a class of .change-language-to-chinese):
jQuery(document).ready(function( $ ){ $('.change-language-to-chinese').on('click',function() { doGTranslate('en|zh-CN'); return false; }); });
But that does not appear to work. I think with the latest version (3.0.1) something fundamentally changed.
(Also, I am assuming that if I load the switcher-via-shortcode somewhere on the page, and it is off-screen, then the necessary javascript should be loaded. With the previous version, I had simply sent a click to the switcher widget and it worked.)
I have tried with support at Gtranslate.io but they do not seem to understand my request for the function.
- The topic ‘Who you gonna call? DogTranslate();’ is closed to new replies.