gform_recaptcha_language

Description

Use this filter to change the language used for the reCAPTCHA field.

Important: This filter has been removed. The recaptcha language can be configured in the form editor by editing the field or by using the gform_pre_render filter to set the $field->captchaLanguage property.

Usage

<?php
add_filter( 'gform_recaptcha_language', 'set_recaptcha_language', 10, 2 );
?>

Parameters

Examples

This example changes the language used for the reCAPTCHA field to Brazilian Portuguese.

<?php
add_filter( 'gform_recaptcha_language', 'set_recaptcha_language', 10, 2 );
function set_recaptcha_language( $language, $form_id ) {
    // must be a language code supported by Google reCAPTCHA - 
    // https://developers.google.com/recaptcha/docs/language
    return 'pt-BR';
}
?>

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

This filter is located in includes/fields/class-gf-field-captcha.php