I think you should localize the File model and use the relation to access it.
For example :
To achieve this you should configure multilang behavior on the File model and retrieve your data using this type of loading (this example is in the page of the behavior):
$model = Page::model()->multilang()->with('articles', 'articles.multilangArticle')->findByPk((int) $id); echo $model->articles->content_en;
I don't understand if I can have translated relations.
I have a GalleryFile model which has a belongs_to relation to a File model
'file' => array(self::BELONGS_TO, 'File', 'file_id')
The file must be localized in italian and english so I put this in the behavior config array
'localizedAttributes' => array('file_id','other_fields' .. )
Usually I can get the File model using the relation,
the nicest thing ever would be to be able to do something like
$model->file_enand get the File which id is the localized english file_id. Is it possibile as now to do something like that ?
Or I have to define a relation for each language?
Regards and thanks to the authors of this excellent extension!