Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

maomami's avatar

Solution for translate model attribute

Hi!

I have a problem, I want to make it possible to translate model attributes into different languages. I found two solutions.

github.com/aenzenith/laravel-localizable

github.com/CloudMonitorApp/Translatable

  • The first library creates an additional table in the database that stores translation options for all models.
  • The second library is based on that we make the attribute of the JSON type and store all possible translation options in it.

What do you think would be the best solution? In terms of speed and ease of access to data? Which one would you use in your project?

Thanks

0 likes
3 replies
forna91fi's avatar

Did you answer to yourself?? I'm looking for the same solution...

krisi_gjika's avatar

@forna91fi what solution? there are two solutions provided on the question itself and many more can be found with some research

Please or to participate in this conversation.