Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
chrillep opened this issue Oct 1, 2022 · 1 comment
Assignees
Labels

Comments

@chrillep
Copy link
Contributor

chrillep commented Oct 1, 2022

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 Gummibeer self-assigned this Oct 4, 2022
@Gummibeer
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants