Madhesh Madhesh - 8 days ago 9
Java Question

how to set localization in google recaptcha

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?

Answer

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.

Comments