Selva
Selva

Reputation: 1670

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?

Upvotes: 6

Views: 11879

Answers (3)

Ghaly Saqqal
Ghaly Saqqal

Reputation: 419

Even you can set it when you want to initialize

<script src='https://www.google.com/recaptcha/api.js?hl=en'></script>

Upvotes: 24

Maxim
Maxim

Reputation: 174

Note, it is not lang but hl now

var RecaptchaOptions = 
{
    'sitekey' : '6LcgSAMTAAAAACc2C7rc6HB9ZmEX4SyB0bbAJvTG',
    hl : 'fr'
};

grecaptcha.render('html_element', RecaptchaOptions );

Upvotes: 4

Musakkhir Sayyed
Musakkhir Sayyed

Reputation: 7170

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.

Upvotes: 9

Related Questions