Exemple #1
0
echo Language::t('main', 'Контакты');
?>
</a>
                            </li>
                            <!-- Languages -->
                            <li>
                                <a href="#" class="mn-has-sub">
                                    <?php 
echo \Yii::$app->language;
?>
                                    <i class="fa fa-angle-down"></i>
                                </a>

                                <ul class="mn-sub">
                                    <?php 
foreach (Lang::getChangeData() as $url => $title) {
    ?>
                                    <li>
                                        <a href="<?php 
    echo $url;
    ?>
"><?php 
    echo $title;
    ?>
</a>
                                    </li>
                                    <?php 
}
?>
                                </ul>
Exemple #2
0
 public function run()
 {
     $data = Lang::getChangeData();
     return $this->render('LanguageChange', ['data' => $data]);
 }