### [wpforms_frontend_recaptcha_url](https://wpforms.com/developers/wpforms_frontend_recaptcha_url/)

**Published:** February 17, 2021
**Author:** Editorial Team

**Excerpt:** The wpforms_frontend_recaptcha_url filter can be used to alter the default URL for the language on Google's reCAPTCHA.


**Content:**

## Description

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.

## Parameters

$url*(string)* URL used for the default language used in Google’s reCAPTCHA.## Source

`wpforms/src/Frontend/Captcha.php`

## More Information

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

## Example

```

/**
 * Alter default reCAPTCHA language URL.
 *
 * @link    https://wpforms.com/developers/wpforms_frontend_recaptcha_url/
 *
 * @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);

```

To find your specific language code, [please see Google’s documentation on reCAPTCHA Language Codes.](https://developers.google.com/recaptcha/docs/language "reCAPTCHA Language Codes")

## Reference Articles

[How to Set the Language for Google reCAPTCHA](https://wpforms.com/developers/how-to-set-the-language-for-google-recaptcha/ "How to Set the Language for Google reCAPTCHA")

**Categories:** Filters Hooks

**Tags:** PHP

---

