0

I have created a translatable model like following in a Custom Plugin Developed by me in OctoberCMS with Translate Plugin

public $implement = [ \RainLab\Translate\Behaviors\TranslatableModel::class];

 public $translatable = ['image'];

public $attachOne = [
        'image' =>  \System\Models\File::class,
];

I was able to add translated files using the Admin Backend, and I both see it in system_files.

But when I try to access the model like below, it always returns the file that is set for 'en' but nor 'fr'

$model->lang('fr');

Chatura Dilan
  • 1,502
  • 1
  • 16
  • 29

0 Answers0