Recently I have requirement to change the language of google captcha to arabic.
I figure out that Google Captcha has the multilingual feature, but I tried different ways but no proper solution unless
a tweak came to my mind (but I believe not the right solution)
Normally :
http://www.google.com/recaptcha/api.js?render=explicit/* PLEASE DO NOT COPY AND PASTE THIS CODE. */
(function() {
if (!window['___grecaptcha_cfg']) {
window['___grecaptcha_cfg'] = {};
};
if (!window['___grecaptcha_cfg']['render']) {
window['___grecaptcha_cfg']['render'] = 'explicit';
};
window['__google_recaptcha_client'] = true;
var po = document.createElement('script');
po.type = 'text/javascript';
po.async = true;
po.src = 'https://www.gstatic.com/recaptcha/api2/r20170126104253/recaptcha__en.js';
var elem = document.querySelector('script[nonce]');
var nonce = elem && elem.getAttribute('nonce');
if (nonce) {
po.setAttribute('nonce', nonce);
}
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
thought of
might it change 'en' to 'ar' but it always 'en'. I would like to know the best approach. Can you provide the solution?