eugenec138 / cakephp-translations
CakePHP 的语言和翻译插件
v1.0.4
2023-06-29 13:51 UTC
Requires
- eugenec138/cakephp-utils: ^1.0.3
Requires (Dev)
- cakephp/cakephp-codesniffer: ^3.0
- phpunit/phpunit: ^5.0
This package is not auto-updated.
Last update: 2024-09-19 20:12:00 UTC
README
关于
CakePHP 3+ 插件,用于管理内容翻译。
安装
您可以使用 composer 将此插件安装到您的 CakePHP 应用程序中。
安装 composer 包的推荐方法是
composer require qobo/cakephp-translations
运行插件的迁移任务
bin/cake migrations migrate -p Translations
设置
加载插件
bin/cake plugin load --routes --bootstrap Translations
要在您的应用程序中加载 Translations 组件,只需在您的表初始化方法中添加行为 Translate 即可
public function initialize(array $config)
{
$this->addBehavior('Translate');
}