Skip to content

Commit b40a203

Browse files
committed
update remove 18n
1 parent 44e2b3f commit b40a203

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

src/PluploadPluginAsset.php

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace emhome\plupload;
44

5-
use Yii;
65
use yii\web\AssetBundle;
76

87
/**
@@ -16,11 +15,12 @@
1615
* @license http://www.plupload.com/license
1716
* @see http://www.plupload.com/contributing
1817
* ```
19-
*
18+
*
2019
* @author emhome <emhome@163.com>
2120
* @since 2.0.1
2221
*/
23-
class PluploadPluginAsset extends AssetBundle {
22+
class PluploadPluginAsset extends AssetBundle
23+
{
2424

2525
/**
2626
* @inheritdoc
@@ -41,25 +41,4 @@ class PluploadPluginAsset extends AssetBundle {
4141
'yii\web\JqueryAsset',
4242
];
4343

44-
/**
45-
* @var string 使用语言包
46-
*/
47-
public $language;
48-
49-
/**
50-
* @inheritdoc
51-
*/
52-
public function init() {
53-
if (!$this->language) {
54-
$this->language = Yii::$app->language;
55-
}
56-
$language = str_replace('-', '_', $this->language);
57-
$fallbackLanguage = substr($this->language, 0, 2);
58-
if ($fallbackLanguage !== $this->language && !file_exists(Yii::getAlias($this->sourcePath . "/js/i18n/{$language}.js"))) {
59-
$language = $fallbackLanguage;
60-
}
61-
$this->js[] = "js/i18n/$language.js";
62-
parent::init();
63-
}
64-
6544
}

0 commit comments

Comments
 (0)