Exemple #1
0
use yii\web\View;
?>

<div class='<?php 
echo $wrapperClass;
?>
'>

	<?php 
echo Html::beginForm();
?>

	<?php 
foreach ($languages as $lang => $langName) {
    ?>
		<?php 
    echo Html::hiddenInput($lang, MultiLanguageHelper::createMultilanguageReturnUrl($lang));
    ?>
	<?php 
}
?>

	<?php 
echo Html::dropDownList('_language_selector', Yii::$app->language, $languages, ['class' => $dropDownClass, 'onchange' => 'submit({d:"aa"})']);
?>

	<?php 
echo Html::endForm();
?>
</div>
Exemple #2
0
	<?php 
foreach ($languages as $lang => $langName) {
    ?>
		<?php 
    if ($lang == Yii::$app->language) {
        ?>

			<span class='language-selector-active'><?php 
        echo $langName;
        ?>
</span>

		<?php 
    } else {
        ?>

			<span class='language-selector-notactive'>
                                <?php 
        echo Html::a($langName, MultiLanguageHelper::createMultilanguageReturnUrl($lang), array('class' => ''));
        ?>
                        </span>

		<?php 
    }
    ?>
	<?php 
}
?>

</div>
Exemple #3
0
            </nav>

            <div class="row lang-menu">
                <ul>
                    <li class="active"><a><?php 
echo Yii::$app->params['mlConfig']['languages'][Yii::$app->language];
?>
</a></li>
                    <?php 
foreach ($langs as $key => $language) {
    ?>
                        <?php 
    if ($key != Yii::$app->language) {
        ?>
                            <li><a href="<?php 
        echo MultiLanguageHelper::createMultilanguageReturnUrl($key);
        ?>
"><?php 
        echo $language;
        ?>
</a></li>
                        <?php 
    }
    ?>
                    <?php 
}
?>
                </ul>

            </div>
        </div>