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