Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Claude Janz first commit d71fc19 Nov 13, 2017
0 contributors

Users who have contributed to this file

38 lines (31 sloc) 608 Bytes
<?php
/**
* @link https://www.klod.ch/
* @copyright Copyright (c) 2016 Klod SA
* @author Claude Janz <claude.janz@klod.ch>
*/
namespace claudejanz\yii2moment;
use Yii;
use yii\web\AssetBundle;
/**
* MomentAsset
*
* @author Claude Janz <claude.janz@klod.ch>
*/
class MomentAsset extends AssetBundle
{
/**
* @inheritdoc
*/
public $sourcePath = '@bower/moment';
/**
* @inheritdoc
*/
public $js = [
'min/moment.min.js',
];
public function init()
{
$this->js[]='locale/'.substr(strtolower(Yii::$app->language),0,2).'.js';
}
}
You can’t perform that action at this time.