matthew-p / yii2-translate-db
Translate DB tables and columns.
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 252
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2023-08-19 23:18:14 UTC
README
Very simple extension for translation DB tables and columns
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist matthew-p/yii2-translate-db "*"
or add
"matthew-p/yii2-translate-db": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by:
In console main.php add:
return [ ... 'controllerMap' => [ ... 'message' => [ 'class' => MPMessageController::class, 'configFile' => '@common/messages/config.php', // Set path to message config file 'storedDbMessages' => '@common/db_messages.php', // File where temporary stored data from db. This file must not be blocked (except) in messages config.php 'tablesMessages' => [ ARModel::class => ['title', 'title_for'], // ActiveRecord model => [column1, column2 ...] ARModel2::class => ['title'], ] ], ... ] ... ];
And run in console:
php yii message