• nils235

    (@nils235)


    Hey there,

    How can I make a reCAPTCHA language-aware? i.e.: Englisch-speaking users getting an English captcha, etc..?

    Thanks in advance,

    nils

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter nils235

    (@nils235)

    Well, ok. Maybe you can incorporate my crude-on-purpose (for maximum readability) proposal:

    /um-recaptcha/includes/core/class-enqueue.php add in line 43:
    if($language_code == 'auto'){
    $lang = get_locale();
    $lang = explode('_', $lang);
    $language_code = $lang[0];
    }

    in /um-recaptcha/includes/admin/class-init.php add line 257:
    'auto' => __( 'Auto', 'um-recaptcha' ),

    Thanks in advance!

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hello @nils235

    Do you use recaptcha v2 or v3?

    Regards.

    Thread Starter nils235

    (@nils235)

    Using v2, @yuriinalivaiko

    cheers!

    Plugin Support yuriinalivaiko

    (@yuriinalivaiko)

    Hello @nils235

    You could you a hook, but you need to create your own code for changing language depend on user language (customizations are not included in our support):

    add_filter('um_recaptcha_language_code', 'my_um_recaptcha_language_code', 10, 1);
    function my_um_recaptcha_language_code ($language_code) {
       // your code
       return $language_code;
    }

    Regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multilanguage site: change language of reCAPTCHA?’ is closed to new replies.