getI18n()->translations = ArrayHelper::merge($app->getI18n()->translations, [ 'links' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@common/modules/links/messages', ], 'link_public' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@common/modules/links/messages', ], ]); } public static function getMenuItemCreator($menu_id): array { $widgets = []; $widgets[] = [ 'id' => 'links', 'title' => Yii::t('links', 'Links'), 'content' => MenuItemCreatorWidget::widget([ 'menu_id' => $menu_id, ]), ]; return $widgets; } }