diff --git a/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js b/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js index 154cc2fd..4d672ed3 100644 --- a/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js +++ b/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js @@ -55,8 +55,7 @@ define( element.async = true; element.src = 'https://www.google.com/recaptcha/api.js' + - '?onload=globalOnRecaptchaOnLoadCallback&render=explicit' + - (this.settings.rendering.lang ? '&hl=' + this.settings.rendering.lang : ''); + '?onload=globalOnRecaptchaOnLoadCallback&render=explicit'; scriptTag.parentNode.insertBefore(element, scriptTag); diff --git a/ReCaptchaUser/view/adminhtml/templates/recaptcha.phtml b/ReCaptchaUser/view/adminhtml/templates/recaptcha.phtml index e9c76038..facac60d 100644 --- a/ReCaptchaUser/view/adminhtml/templates/recaptcha.phtml +++ b/ReCaptchaUser/view/adminhtml/templates/recaptcha.phtml @@ -7,7 +7,6 @@ $config = $block->getCaptchaUiConfig(); $renderingOptions = $config['rendering'] ?? []; $isInvisible = !empty($config['invisible']); -$languageCode = $config['rendering']['lang'] ?? null; ?>
; + + '?onload=globalOnRecaptchaOnLoadCallback&render=explicit'; window.globalOnRecaptchaOnLoadCallback = function () { let token = ''; diff --git a/ReCaptchaVersion2Checkbox/Model/Adminhtml/UiConfigProvider.php b/ReCaptchaVersion2Checkbox/Model/Adminhtml/UiConfigProvider.php index 8300ad6f..e0bf8948 100644 --- a/ReCaptchaVersion2Checkbox/Model/Adminhtml/UiConfigProvider.php +++ b/ReCaptchaVersion2Checkbox/Model/Adminhtml/UiConfigProvider.php @@ -44,7 +44,7 @@ public function get(): array 'sitekey' => $this->getPublicKey(), 'size' => $this->getSize(), 'theme' => $this->getTheme(), - 'lang' => $this->getLanguageCode(), + 'hl' => $this->getLanguageCode(), ], 'invisible' => false, ]; diff --git a/ReCaptchaVersion2Checkbox/Model/Frontend/UiConfigProvider.php b/ReCaptchaVersion2Checkbox/Model/Frontend/UiConfigProvider.php index 8966051c..d2745a2f 100644 --- a/ReCaptchaVersion2Checkbox/Model/Frontend/UiConfigProvider.php +++ b/ReCaptchaVersion2Checkbox/Model/Frontend/UiConfigProvider.php @@ -45,7 +45,7 @@ public function get(): array 'sitekey' => $this->getPublicKey(), 'size' => $this->getSize(), 'theme' => $this->getTheme(), - 'lang' => $this->getLanguageCode(), + 'hl' => $this->getLanguageCode() ], 'invisible' => false, ]; diff --git a/ReCaptchaVersion2Invisible/Model/Adminhtml/UiConfigProvider.php b/ReCaptchaVersion2Invisible/Model/Adminhtml/UiConfigProvider.php index 87e99676..e39215dc 100644 --- a/ReCaptchaVersion2Invisible/Model/Adminhtml/UiConfigProvider.php +++ b/ReCaptchaVersion2Invisible/Model/Adminhtml/UiConfigProvider.php @@ -45,7 +45,7 @@ public function get(): array 'badge' => $this->getInvisibleBadgePosition(), 'size' => 'invisible', 'theme' => $this->getTheme(), - 'lang'=> $this->getLanguageCode() + 'hl' => $this->getLanguageCode() ], 'invisible' => true, ]; diff --git a/ReCaptchaVersion2Invisible/Model/Frontend/UiConfigProvider.php b/ReCaptchaVersion2Invisible/Model/Frontend/UiConfigProvider.php index 3bccb957..47d6cb25 100644 --- a/ReCaptchaVersion2Invisible/Model/Frontend/UiConfigProvider.php +++ b/ReCaptchaVersion2Invisible/Model/Frontend/UiConfigProvider.php @@ -46,7 +46,7 @@ public function get(): array 'badge' => $this->getInvisibleBadgePosition(), 'size' => 'invisible', 'theme' => $this->getTheme(), - 'lang' => $this->getLanguageCode() + 'hl' => $this->getLanguageCode() ], 'invisible' => true, ]; diff --git a/ReCaptchaVersion3Invisible/Model/Adminhtml/UiConfigProvider.php b/ReCaptchaVersion3Invisible/Model/Adminhtml/UiConfigProvider.php index 35056517..354b16d1 100644 --- a/ReCaptchaVersion3Invisible/Model/Adminhtml/UiConfigProvider.php +++ b/ReCaptchaVersion3Invisible/Model/Adminhtml/UiConfigProvider.php @@ -45,7 +45,7 @@ public function get(): array 'badge' => $this->getInvisibleBadgePosition(), 'size' => 'invisible', 'theme' => $this->getTheme(), - 'lang'=> $this->getLanguageCode() + 'hl'=> $this->getLanguageCode() ], 'invisible' => true, ]; diff --git a/ReCaptchaVersion3Invisible/Model/Frontend/UiConfigProvider.php b/ReCaptchaVersion3Invisible/Model/Frontend/UiConfigProvider.php index 77c6512a..7f36312b 100644 --- a/ReCaptchaVersion3Invisible/Model/Frontend/UiConfigProvider.php +++ b/ReCaptchaVersion3Invisible/Model/Frontend/UiConfigProvider.php @@ -46,7 +46,7 @@ public function get(): array 'badge' => $this->getInvisibleBadgePosition(), 'size' => 'invisible', 'theme' => $this->getTheme(), - 'lang'=> $this->getLanguageCode() + 'hl' => $this->getLanguageCode() ], 'invisible' => true, ];