i create new controller in yii look like this:
class LanguageController extends Controller
{
public function actionSwitchLanguage($language)
{
Yii::app()->session = $language;
$this->redirect(Yii::app()->request->urlReferrer);
}
}
in views file, i create new url look like this:
<a href="<?php echo Yii::app()->controller->createUrl('Language/actionSwitchLanguage',array('language'=>'en')); ?>">English</a>
but when clicking the link, it appears error:
Error 404
The system is unable to find the requested action "actionswitchlanguage".
somebody can help me?