Rainlab translate backend form


I am creating a model with translatable string as

$newFlag = new ProductFlagsModel();
                $newFlag->flag_id = $flag['flag-no'];
                $newFlag->name = $flag['deutsch'];
                $newFlag->status = 1;
                $newFlag->setAttributeTranslated('name', $flag['englisch'], 'en');

It works as intended.

the problem is that in the backend form it is not working correctly even though if i change the langauge. interesting thing is that when i save the form manually by clicking the save button in a record then it works.

i dump the record in the update controller and there it is also fine.

is there anything i am doing wrong here?

Hey @ibrarartisan

Can you confirm you are using the latest version of RainLab Translate? There was a bug with setAttributeTranslated in an earlier version of Translate v2.