Issue with FilamentSpatieTranslatable plugin LocaleSwitcher not saving record after v 3 upgrade

Hi everyone, I'm encountering a problem with the LocaleSwitcher from the FilamentSpatieTranslatable plugin (https://filamentphp.com/plugins/filament-spatie-translatable) after upgrading from Filament 2 to Filament 3. In Filament 2, the LocaleSwitcher would change the language and automatically save the current record.(By using the updateRecord function in the SpatieLaravelTranslatableContentDriver) However, after upgrading to Filament 3 and updating the FilamentSpatieTranslatable plugin, it only updates the language without saving the record. I've tried to implement record saving using approaches I've seen mentioned for Filament 3 actions, such as: - Using reactive() - Using onStateUpdated() - Using afterStateUpdated() However, none of these methods seem to be available on the LocaleSwitcher provided by the plugin.
Filament
Spatie Translatable by Filament - Filament
Filament support for Spatie's Laravel Translatable package.
1 Reply
Lara Zeus
Lara Zeus2mo ago
the local Locale Switcher wont save any data to your model. it will only switch the local, and save all data for all locales after pressing save button. it also depend on your form schema, is it a relation or direct inputs in the model?
Want results from more Discord servers?
Add your server