【文件属性】:
文件名称:yii2可翻译:yii2可翻译
文件大小:6KB
文件格式:ZIP
更新时间:2021-02-17 06:27:39
PHP
可翻译的
您必须至少使用PHP 7.1
Yii2框架项目的小部件。 致杰森翻译。
composer require ziya/yii2-translate "^0.2.1"
移居
Attribute that you want translatable should be json field
$this->createTable('{{%article}}', [
'id' => $this->primaryKey(),
'name' => $this->json(),
....
]);
活动记录
您的模型应使用特征Translatable。
use Translatable;
如果要使它们成为语言要求,则使用TranslatableValidator规则,然后提供所需的语言
Transla
【文件预览】:
yii2-translatable-master
----.gitignore(36B)
----src()
--------TranslatableValidator.php(1KB)
--------Translatable.php(4KB)
--------widgets()
--------behaviours()
----composer.json(273B)
----README.md(2KB)