Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting recaptcha in a different language other than english

Tags:

recaptcha

Is it me or is recaptcha images cannot be translated to another language other than EN? I have enter image description here and it is still in English. Is this intentional?

like image 273
gerl Avatar asked Sep 17 '13 21:09

gerl


People also ask

Can I use reCAPTCHA globally?

Can I use reCAPTCHA globally? Yes, please use "www.recaptcha.net" in your code in circumstances when "www.google.com" is not accessible. After that, apply the same to everywhere else that uses "www.google.com/recaptcha/" on your site.

Can I customize reCAPTCHA?

Custom theming allows you to control exactly how the reCAPTCHA image appears. (Here is a demo of custom theming.) In order to use custom theming, you must first set the theme property of the RecaptchaOptions to 'custom'. This tells reCAPTCHA that it should not create a user interface of its own.

How do you translate CAPTCHA?

Captcha is an abbreviation for 'completely automated public Turing test to tell computers and humans apart'.

What is the difference between CAPTCHA and reCAPTCHA?

reCAPTCHA is a free service from Google that helps protect websites from spam and abuse. A “CAPTCHA” is a turing test to tell human and bots apart.


Video Answer


2 Answers

replace lang to hl and it'll work:

<script type="text/javascript">
var recaptcha1;
var myCallBack = function() {
    //Render the recaptcha1 on the element with ID "recaptcha1"
    recaptcha1 = grecaptcha.render('recaptcha1', {
        'sitekey': '6LdJLws_your site key',
        'hl' : 'fr'
    });
};
</script>
like image 136
jamadagni Avatar answered Oct 26 '22 23:10

jamadagni


For reCAPTCHA 2. Since a while have passed

This is your link to cdn look at the end, hl parameter

<script src="https://www.google.com/recaptcha/api.js?onload=myCallBack&render=explicit&hl=fr" async defer></script>

This is your captcha inside the form

<div id="recaptcha1"></div>

This is your javascript you can specify the lang code here too, I assume one of them is enough

var recaptcha1;
var myCallBack = function() {
    //Render the recaptcha1 on the element with ID "recaptcha1"
    recaptcha1 = grecaptcha.render('recaptcha1', {
    'sitekey': '6LdJLws_your site key',
    'lang' : 'fr'
   });};

You can add multiple reCAPTCHAs with this method.

Here is full language reference: https://developers.google.com/recaptcha/docs/language?hl=en

like image 39
atilkan Avatar answered Oct 26 '22 22:10

atilkan