Waavi / translation

Better translation management for Laravel
MIT License
359 stars 167 forks source link

How to set translations to Model for all languages #139

Open ludmanp opened 6 years ago

ludmanp commented 6 years ago

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();

AttilaSzendi commented 5 years ago

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

ludmanp commented 5 years ago

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

AttilaSzendi commented 5 years ago

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!