appleboy / appleboy/react-recaptcha

Localization is not working in latest version 2.3.2 backward compatibility of 2.2.6 is broken

Open
#201 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
643
Forks
96
PR merge metrics
No merged PRs in 30d

Description

Hi Localisation is not working in your latest version : 2.3.2 and it breaks in our production environment.

Here is the steps to reproduce the issue.

1. Pass locale in google captcha . For ex hl=fr_fr in url - https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit&hl=fr_fr'.

2. I see that google captacha is always loading with en_us locale.

When i change the version to 2.2.6, then it started working. Request you look into this issue and let us know ASAP else will remove this lirary from our project.

Here is sample code for your reference -
class GoogleRecaptche extends Component {
constructor(props) {
super(props);
const locale = window.json && window.json.locale ? window.json.locale : "fr-fr";
recaptcha.src = 'https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit&hl='+locale;
document.head.appendChild(recaptcha);
}
render (
return () {
this.recaptchaInstance = e}
sitekey={sitekey}
render="explicit"
verifyCallback={this.verifyCallback}
onloadCallback={this.callback}
expiredCallback={this.expiredCallback}
/>
}
}

Thanks,
Reetesh

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.