abdualiym / yii2-text
Yii2 文本扩展
该软件包的官方仓库似乎已删除,因此该软件包已被冻结。
1.1.4
2018-09-19 13:19 UTC
Requires
Requires (Dev)
- phpunit/phpunit: 4.*
README
该扩展允许构建多语言滑块。
安装
- 使用 composer 安装
composer require abdualiym/yii2-text
- 在执行 composer install 后,运行控制台命令以创建表格
php yii migrate/up --migrationPath=@vendor/abdualiym/yii2-text/migrations
- 添加到后端配置文件
'controllerMap' => [ 'categories' => [ 'class' => 'abdualiym\text\controllers\CategoryController', ], 'text' => [ 'class' => 'abdualiym\text\controllers\TextController', ], ],
- 添加到公共配置文件
'i18n' => [ 'translations' => [ 'text' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@vendor/abdualiym/yii2-text/messages', 'sourceLanguage' => 'en', 'fileMap' => [ 'text' => 'text.php', ], ], ] ],