I am using google recaptcha in my web application. My web application works for both English and French. Is it possible to add the localization in my google recaptcha too?
Even you can set it when you want to initialize
<script src='https://www.google.com/recaptcha/api.js?hl=en'></script>
You can set language in recaptcha option. Place this code before you call recaptcha.
<script type="text/javascript">
var RecaptchaOptions = {
lang : 'fr'
};
</script>
The language codes are available Here.
If you want to render recaptcha automatically using the widget, Here is the documentation is available.
You can use Javascript resources(api.js) by passing hl parameter to it.
Note, it is not lang but hl now
var RecaptchaOptions =
{
'sitekey' : '6LcgSAMTAAAAACc2C7rc6HB9ZmEX4SyB0bbAJvTG',
hl : 'fr'
};
grecaptcha.render('html_element', RecaptchaOptions );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With