dimsav / laravel-translatable

[Deprecated] A Laravel package for multilingual models
MIT License
1.95k stars 320 forks source link

Usability for a translatable field of a model? #471

Closed thitami closed 6 years ago

thitami commented 6 years ago

First of all, amazing work with this package @dimsav !

I'd like to ask if you (or anyone else) believe that it can be helpful in a case of having a translatable field. In specific, I have got a a movies table which has a title field among the other fields but the only translatable is actually the latter. Then, I have got a movie_translations table with translated_title and locale fields.

Does it worth from your point of view the package or it will be an overkill?

Many thanks again for this package!

Gummibeer commented 6 years ago

This package does the same like your example - you have a second table with all translations. For a single field this adds an overhead cause you everytime need a join and/or second query. There is a package by @spatie that does it by using the MySQL5.7 JSON column: https://github.com/spatie/laravel-translatable If you met all requirements I would recommend you to use the package by spatie. By the way: spatie creates awesome and outstanding packages! 😉

thitami commented 6 years ago

@Gummibeer Many thanks for the insights! I am sure that spatie also creates awesome packages. 🙂