Astrotomic / laravel-translatable

A Laravel package for multilingual models
https://docs.astrotomic.info/laravel-translatable/
MIT License
1.23k stars 155 forks source link

map models to laravel-translations translation table using [lang, group, key, value] #288

Closed chrillep closed 1 year ago

chrillep commented 1 year ago

Is your feature request related to a problem? Please describe. mapping models translatable attributes to a single translations table

Describe the solution you'd like using a single translations table for every models translatable attribute.

Describe alternatives you've considered writing it myself :)

Additional context Since laravel-translation is good at handling translations ex. editing, import, export. whats missing is a connection to an actual/ if needed model for each translation. The bridge would be using laravel-translatable to connect laravel-translation language/translations to models. refs:

relates:

Gummibeer commented 1 year ago

Hey, it's not what this package aims to achieve as the dedicated translation models allow to cast, validate and observe each translation type. And also allows more efficient queries than a simple key-value table. In case you want a more simple solution you can check out https://github.com/spatie/laravel-translatable as they are using JSON columns instead of dedicated models/tables.