#73662 reCAPTCHA language settings
Ben Del Rio 3 years, 4 months ago
I’m working on a page using JupiterX and the page that I’m building is in Spanish, I’ve already switched WP to Spanish, updated the translations and everything is working fine so far; the question I have is about the language settings for the reCAPTCHA function on a form that we’re using. According to Google, we should be able to use a language code to change the display functionality of the reCAPTCHA feature to any of a list of available languages; however, I can’t seem to find any place in Raven or anywhere else where I can select the specific language that we wish to use for the button, in this case Spanish.
Can you please point me in the right direction?
Thanks in advance,
Ben Del RioMohsin Al-Rabieai Support Team 3 years, 4 months ago
ReCaptcha 2 takes the language settings from the Browser or google account settings by default. Based on this QA, you should be able to specify the language by adding a parameter to the end of the reCaptcha JS library:
So, if you add this parameter to this line, it should do the trick:
wp-content/plugins/raven/includes/modules/forms/fields/recaptcha.php line 95
$html .= "<script src='https://www.google.com/recaptcha/api.js'></script>"; // @codingStandardsIgnoreLine
$html .= "<script src='https://www.google.com/recaptcha/api.js?explicit&hl=en'></script>"; // @codingStandardsIgnoreLine
Unfortunately, your file permissions didn’t allow me to do this change for you so you need to do it on your own. This is the only way to do it and unless google didn’t remove this language parameter feature, there is no other way to do it.
Hope it helps 🙂