• Resolved michalrama

    (@michalrama)


    Hello,

    I need to change the text language for ReCaptcha.

    Even though I followed their instructions, installed WPCode, created a PHP snippet, put the code and appropriate settings in it, it has no effect.

    I honestly don’t know what the problem is. In fact, I don’t even know if the code even runs.

    Please help

    Thank you

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @michalrama,

    Can you please share the code that you are trying to use?

    Also, if you can check that the snippet you created is activated and set to the location “Run Everywhere” – that should also help.

    Thread Starter michalrama

    (@michalrama)

    Hello,

    I just added a simple code there introducing WPForms itself

    /**
    * Set the language for Google reCAPTCHA.
    *
    * @link https://wpforms.com/developers/how-to-set-the-language-for-google-recaptcha/
    */

    function wpf_dev_recaptcha_language( $url ) {

    // Set the language code to FR (French)
    return esc_url_raw( add_query_arg( array( 'hl' => 'cs '), $url ) );
    }

    add_filter( 'wpforms_frontend_recaptcha_url', 'wpf_dev_recaptcha_language', 10, 1);

    However, I already figured it out.

    When I changed run everywhere to frontend conditional logic and added to the logic only for a specific URL, it already works.

    Thanks for the quick reply and have a nice day

    Michal

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.