Setting reCAPTCHA Version 2 set another language other than English

neo picture neo · Feb 27, 2015 · Viewed 39.2k times · Source

enter image description here

How can I set this in another language, ie:. French

I've tried:

var RecaptchaOptions = {
     lang : 'fr',
  };

Found above here

Which does nothing.

I couldn't find relevant info under API Reference -> Version 2 on Google Docs for reCAPTCHA

Additional information:

I'm using this on rails, with gem "recaptcha" Found here

Answer

LuBre picture LuBre · Mar 2, 2015

You just need to specify the parameter "?hl=" in the script's url:

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

Not very well documented, indeed!

find your language code here: https://developers.google.com/recaptcha/docs/language