The wpforms_frontend_recaptcha_url filter used to alter the default URL for the reCAPTCHA language. By default, Google’s reCAPTCHA will detect the language and supply the correct translations for your site. This filter should only be used if you want to force the language for all visitors.


(string) URL used for the default language used in Google’s reCAPTCHA.



More Information

The filter can be used to alter the default URL for the language on Google’s reCAPTCHA.


 * Alter default reCAPTCHA language URL.
 * @link
 * @param   string  $url  URL of language to be used for Google's reCAPTCHA.
 * @return  string

function wpf_dev_recaptcha_language( $url ) {
    // Set the language code to FR (French)
    return esc_url_raw( add_query_arg( array( 'hl' => 'fr '), $url ) );
add_filter( 'wpforms_frontend_recaptcha_url', 'wpf_dev_recaptcha_language', 10, 1);

Reference Articles

How to Set the Language for Google reCAPTCHA