Waavi/translation

How to set translations to Model for all languages

ludmanp opened this issue · 3 comments

Is tere any possibility to set attribute values for different languages before save?

For example something like
$page = new \App\Page();
$page->title = ['en'=>'title', 'es'=>'title1'];
$page->save();

@ludmanp Have you found the solution for your problem? It would be great.

It seems, that the best way is to do something like
$model->title = json_encode(['en'=>'title', 'es'=>'title1']);

It seems, that the best way is to do something like
$model->title = json_encode(['en'=>'title', 'es'=>'title1']);

It is a good idea. thank you!