I used your multilingual behaviour to create a form for multiple languages dynamically.
'languages' => ['pt' => 'Português', 'fr' => 'Français', 'en' => 'English', 'ru'=>'Russian']
This is my array, and the multilingual behavior is only updating PT and RU.
PT however is my default language and if I switch EN to the last position of the array, it works...
My POST is correct and if I load the model and change a specific title manually and save() it works.
ie:
$model->title_en = 'changed in view'; $model->save();
I'm loading the values with the default $model->load(\Yii::$app->request->post()). Is that an issue?
I noticed that in saveTranslations() in MultilingualBehavior, getLangAttribute($attribute . "_" . $lang); returns empty for all languages except for the default language and the one in the last position of the array.
Hi @OmgDef
I used your multilingual behaviour to create a form for multiple languages dynamically.
'languages' => ['pt' => 'Português', 'fr' => 'Français', 'en' => 'English', 'ru'=>'Russian']
This is my array, and the multilingual behavior is only updating PT and RU. PT however is my default language and if I switch EN to the last position of the array, it works...
My POST is correct and if I load the model and change a specific title manually and save() it works. ie:
$model->title_en = 'changed in view'; $model->save();
I'm loading the values with the default $model->load(\Yii::$app->request->post()). Is that an issue? I noticed that in saveTranslations() in MultilingualBehavior, getLangAttribute($attribute . "_" . $lang); returns empty for all languages except for the default language and the one in the last position of the array.
Here follows my model configuration
Is this a bug?
Thanks for any help.