F
Filamentβ€’3d ago
st4rcruz3r

Tags & Translatable Plugin

Hi folks, i'm trying to use Filament Spatie Tags & the translatable Plugin. The Translatable Plugin runs like a charm, but how to implement the Tags to work with the translatable Plugin. I cant find anything and just to do this: public $translatable = ['description', 'location_description', 'tags']; does not work. Thx for ur help
7 Replies
st4rcruz3r
st4rcruz3rβ€’12h ago
No one? Or is it too easy and not worth mentioning? πŸ˜‰
awcodes
awcodesβ€’12h ago
tags are their own separate model so you'll also need to make them translatable on that model too.
st4rcruz3r
st4rcruz3rβ€’12h ago
Ok, so I extend the Tags class and add $translatable to it. ill try
awcodes
awcodesβ€’12h ago
looks like it's built into the spatie tags package, you might need to override the creating / updating for the field instead. https://spatie.be/docs/laravel-tags/v4/advanced-usage/adding-translations
awcodes
awcodesβ€’12h ago
haven't really looked into the filament plugin to see if it's available out of the box but i'm not seeing anything in the docs of the plugin about it.
st4rcruz3r
st4rcruz3rβ€’11h ago
I dont see something either, Both are official Filament plugins, but they dont seem to work together? Well, I found out, When im using the original TagsInput it does not work either. I added everything, made a new column called tags, added it to the $translatable. And it works, until I use the Language Switcher from the Translatable Plugin. Enter on the TagsInput does not work anymore. On a normal TextInput it works like a charm.
awcodes
awcodesβ€’11h ago
hmm. yea, sorry, not totally sure at the moment. don't do much with either of them.
Want results from more Discord servers?
Add your server