'Recaptcha translation

Does anyone know how to change text language from Recaptcha?

I've already tried:

<script type="text/javascript">
var RecaptchaOptions = {
   lang : 'fr',
};
</script>

But it doesn't change.



Solution 1:[1]

If you mean the language in the actual images that you are trying to solve, unfortunately you can't change the language of that text, at least not yet. The only thing you can change is the language of the interface (the text/prompt in the widget, etc.).

Response to comment: well, according to the docs, you seem to have it right. Is this code place in the same page where the widget appears?

The docs also say:

you need to add the following code in your main HTML page anywhere before the <form> element where reCAPTCHA appears (this will not work if placed after the main script where reCAPTCHA is first invoked)

so also make sure that this code is placed before the <form> tag which encloses the reCAPTCHA widget.

Solution 2:[2]

For the reCAPTCHA V2 widget you can override the default interface language detection as a parameter to the javascript. See the new docs.

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

Solution 3:[3]

set your lang at last of api address (persian "farsi"):

https://www.google.com/recaptcha/api.js?hl=fa

find your language short name in https://developers.google.com/recaptcha/docs/language

Solution 4:[4]

Append &amp;hl=fr to the public key.

Solution 5:[5]

Appending the language code to your public key work very well :

define('RECAPTCHA_PUBLIC_KEY', '__YOUR_PUBLIC_KEY_HERE__&amp;hl=fr');
echo recaptcha_get_html(RECAPTCHA_PUBLIC_KEY);

So you can remove your JavaScript from your code. Or leave it if you use other options, but remove "lang:'fr'"

Solution 6:[6]

RecaptchaOptions is never working.

Another solution is to add a parametrt hl= langCode while we including the captcha script

<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey .  &hl=de">/script>

Solution 7:[7]

You pasted the incorrect js. There should not be a comma after lang: 'fr'. The correct code is:

<script type="text/javascript">
var RecaptchaOptions = {
   lang : 'fr'
};
</script>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Aaron
Solution 3
Solution 4 Hang
Solution 5 Vadzym
Solution 6 Vinesh EG
Solution 7 karp