Initial import
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\controllers;
|
||||
|
||||
|
||||
class BaseController extends \yii\web\Controller
|
||||
{
|
||||
public function beforeAction($action)
|
||||
{
|
||||
$data = explode('/', $_SERVER['REQUEST_URI']);
|
||||
if(!empty($data[1]) && in_array($data[1], \Yii::$app->params['languages']))
|
||||
\Yii::$app->language = $data[1];
|
||||
return parent::beforeAction($action); // TODO: Change the autogenerated stub
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user