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 help10 Replies
No one? Or is it too easy and not worth mentioning? π
tags are their own separate model so you'll also need to make them translatable on that model too.
Ok, so I extend the Tags class and add $translatable to it. ill try
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
Adding translations | laravel-tags
laravel-tags
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.
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.
hmm. yea, sorry, not totally sure at the moment. don't do much with either of them.
I have this in my model
that doesn't work at all
Works with TagsInput, but not with the SpatieTagsInput. All good
using my fork? if yes can you open an issue in github and will look into it.