gstackoverflow
gstackoverflow

Reputation: 37098

How to change text localization “I'm not a robot” in recaptcha?

On different PC I see different localizations for I'm not a robot lable although I locates within one city. Aim - always to show same test distincts from I'm not a robot

I have wrote following code to change label I'm not a robot in recaptcha.

<script type="text/javascript">
    $(document).ready(function () {
        $("#recaptcha-anchor-label").text("Something different.");
    });
</script>

maybe problem related with Iframe?

Can you help to fix my problem?

Upvotes: 0

Views: 2497

Answers (2)

You cannot change that specific text because it belongs to a third party iframe, though there is a workaround that fulfils exactly what you're asking for.

You can append a new div on the parent div you can control, aligning and overlapping it on the label text, considering the Google Captcha has always a fixed size. Therefore, according to documentation, considering you may have the main Captcha div on your code with class="g-recaptcha", you simply do:

$('.g-recaptcha').append('<div id="new_label"></div>');  
$('#new_label').text("My custom text");
$('#new_label').css({"position":"absolute", "width":"160px", "top":"27px", "left":"53px", "background-color":"#f9f9f9"});

it works :)

enter image description here

Upvotes: 0

gstackoverflow
gstackoverflow

Reputation: 37098

It is possible to force language if use following url:

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

Upvotes: 1

Related Questions