Commit 37c74c6a authored by thomas craipeau's avatar thomas craipeau
Browse files

yii cookie

parent 2d43c35c
......@@ -69,8 +69,8 @@ class NewsModule extends \yii\base\Module {
$themeName = $this->getTheme();
ThemeHelper::setWebsiteTheme($themeName);
if(@Yii::app()->request->cookies['lang'] && !empty(Yii::app()->request->cookies['lang']->value))
Yii::$app->language = (string)Yii::app()->request->cookies['lang'];
if(@Yii::$app->request->cookies['lang'] && !empty(Yii::$app->request->cookies['lang']->value))
Yii::$app->language = (string)Yii::$app->request->cookies['lang'];
else
Yii::$app->language = (isset(Yii::$app->session["lang"])) ? Yii::$app->session["lang"] : 'fr';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment