ReCaptcha v2 multilingual issue
-
I would like the recaptcha to use the language of the site (not the browser).
I got this code working with Captcha on WPC Form 7, but not with this plugin.
add_action( ‘wpcf7_enqueue_scripts’, ‘custom_recaptcha_enqueue_scripts’, 11 );
function custom_recaptcha_enqueue_scripts() {
$current_lang = ICL_LANGUAGE_CODE;
wp_deregister_script( ‘elementor-recaptcha-api’ );$url = ‘https://www.google.com/recaptcha/api.js’;
$url = add_query_arg( array(
‘onload’ => ‘recaptchaCallback’,
‘render’ => ‘explicit’,
‘hl’ => $current_lang ), $url );wp_register_script( ‘elementor-recaptcha-api’, $url, array(), ‘2.0’, true );
}I guess I need to know what the wpcf7_enqueue_scripts in add_action( ‘wpcf7_enqueue_scripts’, ‘custom_recaptcha_enqueue_scripts’, 11 ) by the correct target. Could you please help me? Thanks a lot!
The page I need help with: [log in to see the link]
- The topic ‘ReCaptcha v2 multilingual issue’ is closed to new replies.