Skip to content

Commit

Permalink
Set captcha language in AppAsset
Browse files Browse the repository at this point in the history
  • Loading branch information
itstructure committed Aug 4, 2020
1 parent 4e12fe8 commit ad03830
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions assets/AppAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace app\assets;

use Yii;
use yii\web\AssetBundle;

/**
Expand All @@ -11,6 +12,20 @@
*/
class AppAsset extends AssetBundle
{
public function init()
{
parent::init();

$this->js = [
'js/preloader.js',
'js/custom.js',
'js/feedback.js',
'js/navbar.js',
'js/wow.min.js',
'https://www.google.com/recaptcha/api.js?hl='.Yii::$app->language,
];
}

public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
Expand All @@ -20,14 +35,6 @@ class AppAsset extends AssetBundle
'css/style.css',
'css/navbar.css',
];
public $js = [
'js/preloader.js',
'js/custom.js',
'js/feedback.js',
'js/navbar.js',
'js/wow.min.js',
'https://www.google.com/recaptcha/api.js',
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
Expand Down

0 comments on commit ad03830

Please sign in to comment.