controllerMap['migrate']['migrationPath'][] = '@common/modules/languages/migrations'; $app->getUrlManager()->addRules([ 'languages/manage/language/view/' => 'languages/manage/language/view', ]); // add languages $app->getI18n()->translations = ArrayHelper::merge($app->getI18n()->translations, [ 'languages' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@common/modules/languages/messages', ], ]); // add menu items if (basename($app->getBasePath()) === 'backend') { $app->params['adminMenu'][] = [ 'label' => \Yii::t( 'languages', 'Site Languages' ), 'icon' => 'language', 'url' => [ '/languages/manage/language/index' ], 'visible' => \Yii::$app->user->can( 'admin' ) || \Yii::$app->user->can( 'LanguagesManagement' ) ]; } } }