安装yii2mod.rbac遇到错误Unable to locate message source


安装yii2mod.rbac后遇到错误提示:Unable to locate message source for category 'yii2mod.rbac'.

在启用i18n组件后工作正常

    'i18n' => [
        'translations' => [
            '*' => [
                'class' => 'yii\i18n\PhpMessageSource',
                'basePath' => '@app/messages', // if advanced application, set @frontend/messages
                'sourceLanguage' => 'en',
                'fileMap' => [
                    //'main' => 'main.php',
                ],
            ],
        ],
    ],

 

Archives