Support the ongoing development of Laravel.io →
Database Eloquent Architecture
Last updated 2 years ago.
0

Hello @romin4you, I 've created a package igaster/laravel-translate-eloquent that adds translation to any Eloquent Model. It requires only one additional table in your DB where the translations will be stored...

You can get/set a translated key as it was a normal Eloquent key (eg $article->title), when actually the correct translation will be looked up and returned from the Translations table... Of course you can request a translation to any locale.

  • It supports a fallback locale if there is no translation in the current locale.

Hope it is usefull... Cheers!

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

romin4you romin4you Joined 28 Oct 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.