Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This hook can be used to change the language of individual Google ReCaptcha fields.
Usage
add_filter('frm_recaptcha_lang', 'change_my_captcha_lang', 20, 2);
Parameters
- $lang (string)
- $field (array)
Examples
Change ReCaptcha Language
You can use the example below to change the language of individual ReCaptcha fields. A full list of acceptable language codes can be found from Google here.
add_filter('frm_recaptcha_lang', 'change_my_captcha_lang', 10, 2);
function change_my_captcha_lang($lang, $field){
if($field['id'] == 25) { //change 25 to the ID of the first captcha field to change
$lang = 'fr'; //change this to the language code of your choice
}
return $lang;
}