Closed alexweb-zz closed 9 years ago
@alexweb You should override $languageField
property in your query class
https://github.com/OmgDef/yii2-multilingual-behavior/blob/master/src/MultilingualTrait.php#L16
@alexweb something like this
class MyQuery extends MultilingualQuery
{
public $languageField = 'language_id';
}
@alexweb also if you set abridge
property to false you should call localized scope with second parameter Post::find()->localized('en-US', false)->where(['id' => 2])->one()
Ok, thanks
Looks like languageField attribute is not working:
I got the following error: "Column not found: 1054 Unknown column 'language' in 'where clause'"