Page translatable
What I’m trying to do:
Make a custom Filament v3
What I did:
Switching the language via the locale switcher does not change the form input values.
Everything stays in the default locale. No errors in console or logs.
Expected: When switching to e.g.
Code snippet:
Note:
This is a custom
Model translation works fine outside Filament.
But in this
Any ideas what I’m missing?
Thanks!
Make a custom Filament v3
Page translatable using spatie/laravel-translatable. I want the user to switch languages and edit localized values.What I did:
- My
Settingmodel usesHasTranslationsand stores JSON values correctly. - My
PageusesTranslatabletrait. - Locale switcher appears via
Actions\LocaleSwitcher::make(). - The form has inputs like
TextInput::make('html_title'),RichEditor::make('footer_descript'), etc.
Switching the language via the locale switcher does not change the form input values.
Everything stays in the default locale. No errors in console or logs.
Expected: When switching to e.g.
en, the form should load html_title and others in English.Code snippet:
Note:
This is a custom
Page, not a Resource. Model translation works fine outside Filament.
But in this
Page form, switching language doesn’t affect input values.Any ideas what I’m missing?
Thanks!