Localization is not working in latest version 2.3.2 backward compatibility of 2.2.6 is broken
reetesha opened this issue · 1 comments
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.
-
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'.
-
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 () {
<Recaptcha
ref={e => this.recaptchaInstance = e}
sitekey={sitekey}
render="explicit"
verifyCallback={this.verifyCallback}
onloadCallback={this.callback}
expiredCallback={this.expiredCallback}
/>
}
}
Thanks,
Reetesh