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

Ok, I have solved this for my projects and have created a package for anyone that comes into this situation again: TranslateThatModel

Last updated 2 years ago.

Here is another approach on translating Eloquent objects:

Last updated 2 years ago.


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 all 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!


Sign in to participate in this thread!


Your banner here too?

mabasic mabasic Joined 3 Feb 2014


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

Your logo here?

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

© 2024 - All rights reserved.