Revision #10 has been created by JQL on Dec 5, 2023, 4:22:11 PM with the memo:
Edited code to insert missing closing bracket
« previous (#9) next (#11) »
Changes
Title
unchanged
How to add a DropDown Language Picker to the Menu
Category
unchanged
How-tos
Yii version
unchanged
2.0
Tags
unchanged
i18n,AJAX,bootstrap,internationalization,bootstrap menu
Content
changed
[...]
['label' => Yii::t('app', 'Contact'), 'url' => ['/site/contact']],
Yii::$app->user->isGuest ? ['label' => Yii::t('app', 'Login'), 'url' => ['/site/login']] : '<li class="nav-item">'
. Html::beginForm(['/site/logout'])
. Html::submitButton(
// 'Logout (' . Yii::$app->user->identity->username . ')', // change this line as well to the following:
Yii::t('app', 'Logout ({username})'), ['username' => Yii::$app->user->identity->username]),
['class' => 'nav-link btn btn-link logout']
)
. Html::endForm()
. '</li>',
],[...]