recpatcha ‘robot’ translation not working
-
I think I may have found a clue to the recaptcha not translating problem…
I was having the same problem, and as I was adding on to another forum post, I stumbled upon something that worked — well not really.
My language is japanese, language code ja.
I am using qtranslate-x, and I am using two forms, one on the english side of the page, one on the japanese side of the page. At first, I was using the plugin default on the english side and on the japanese form I am putting in values for the language. It didnt work.
the short and skinny is that if I turn off the two forms and use just one (though this is not acceptable for the site), it appears to work not with ‘ja’, but if I put in ‘[:en]en[:ja]ja[:]’ (though it needs reloads, maybe)…but with two forms, it doesn’t.
Out of the box, I tried just using ja, but that didn’t work. That should have worked by itself.
Then, I tried using [:en]en[:ja]ja[:] as the language code in this plugin, per a suggestion elsewhere, but it didn’t seem to work.
I tried changing my site’s default language to ja from en, but no go. At this point, I thought it’s a google translate problem, and checked the language…it is translated.
Originally I had tried using this script via a snippet because I really wanted it to switch the language depending on qtranslate, but the original’s “qtranxf_getLanguage())” didn’t seem to work, so then modified it to try to hardcode the “ja”:
function wptricks24_recaptcha_scripts() { wp_deregister_script( 'google-recaptcha' ); $url = 'https://www.google.com/recaptcha/api.js'; $url = add_query_arg( array( 'onload' => 'recaptchaCallback', 'render' => 'explicit', 'hl' => 'ja'), $url ); wp_register_script( 'google-recaptcha', $url, array(), '2.0', true ); } add_action( 'wpcf7_enqueue_scripts', 'wptricks24_recaptcha_scripts' );
That didn’t work.
I was going to try turning qtranslate off…but was afraid of losing all my translations…
Then it occurred to me to use the script above with the [:en]en[:ja]ja[:]. Voila. Sometimes, I had to reload the page to make it work in japanese. (changing the language switcher in qtranslate was not enough. other times it worked.)
I would prefer to use your plugin, but it doesn’t seem to work, even with [:en]en[:ja]ja[:]. I tried using that on both forms, I tried changing the order of the languages. On a whim I just put qtranxf_getLanguage()) in there. Not sure where to go from here.
- The topic ‘recpatcha ‘robot’ translation not working’ is closed to new replies.