lajax / yii2-translate-manager

Translation Manager
MIT License
227 stars 90 forks source link

Optimaze #74

Closed igortsev closed 8 years ago

igortsev commented 8 years ago

I am doing the translation attributes in the model through behavior. After the transfer, they entered into a database for translation. But when you start optimization removes them. Although their transfer is required.

How to exclude the removal by optimization?

public function behaviors() { return [ [ 'class' => TranslateBehavior::className(), 'translateAttributes' => ['name', 'description'], ], ]; }

moltam commented 8 years ago

You should configure your tables in the module configuration (see readme).

igortsev commented 8 years ago

Do you meen...

'tables' => [ // Properties of individual tables [ 'connection' => 'db', // connection identifier 'table' => '{{%language}}', // table name 'columns' => ['name', 'name_ascii'],// names of multilingual fields 'category' => 'database-table-name',// the category is the database table name ] ]

moltam commented 8 years ago

Yes

igortsev commented 8 years ago

Thanks. Have a good day