Hello, I have followed this guide to be able to change the language in my application. The guide creates a dropdown to change to language, but I want links instead. How can I do that?
This is the view: (components/views) langbox.php
<?php echo CHtml::form(); ?>
<div id="langdrop">
<?php echo CHtml::dropDownList('_lang', $currentLang, array(
'sv' => 'Svenska', 'en' => 'English'), array('submit' => '')); ?>
</div>
<?php echo CHtml::endForm(); ?>
This is the file under components that creates a widget, langBox.php
<?php
class LangBox extends CWidget
{
public function run()
{
$currentLang = Yii::app()->language;
$this->render('langBox', array('currentLang' => $currentLang));
}
}
?>