public function translateAttributes($event) { /* @var $owner BaseActiveRecord */ $owner = $this->owner; foreach ($this->translateAttributes as $attribute) { $owner->{$attribute} = Yii::t($this->category, $owner->attributes[$attribute]); } }