Skip to content

Commit

Permalink
Merge pull request #28 from parwinderD4D/patch-1
Browse files Browse the repository at this point in the history
recaptcha text language.
  • Loading branch information
matt-west authored Jan 17, 2022
2 parents 2262634 + d016a9a commit 4e2d74d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/CraftRecaptchaService.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class CraftRecaptchaService extends Component
public function render(array $options = [])
{
$settings = CraftRecaptcha::$plugin->getSettings();

\Craft::$app->view->registerJsFile('https://www.google.com/recaptcha/api.js');
$currentLanguage = (\Craft::$app->getSites()->getCurrentSite()->language)? \Craft::$app->getSites()->getCurrentSite()->language :'en' ;
\Craft::$app->view->registerJsFile('https://www.google.com/recaptcha/api.js?&hl='. $currentLanguage);

$defaultOptions = [
'siteKey' => $settings->getSiteKey()
Expand Down

0 comments on commit 4e2d74d

Please sign in to comment.