F
Filament2mo ago
Marcel

Filament V4 - Best practice on multi language json fields ?

Good day, im currently working on a side project for myself to improve my overall Filament knowledge and Im currently a point where i am kinda lost. I try to create a "product" with multi-language names, description etc. The database is setup for json to make the language string itself easy to store and receive. Now im looking for a way to make the user input in the admin panel modern, minimalistic and not so cluttered. I found the outerweb/filament-translatable-fields package and gave it a try, thats also my current state but i dont like the aestetic of having multiple fields with the toggles for the language. So the question is more general and i want to know your "way to go" for theese kind of things. I've also attached an image of the related part in the Form.
No description
3 Replies
Marcel
MarcelOP2mo ago
Thank you, already saw it on the Homepage, thought i can explore some alternatives without Plugins or get some more input regarding the translations. But look good, already considered this 2 times this day alone 😄
Azad Furkan ŞAKAR
The key point here is that if you store translations as JSON, you need to wrap them according to the language code. But if you store them in a separate table, you can write a custom hint action for this. Separate table and custom action is also could be good solution really

Did you find this page helpful?