Shroomteller
Shroomteller
FFilament
Created by Shroomteller on 3/2/2024 in #❓┊help
Filament Language Switch not visible outside panels
Well, it turns out this is extremely simple with a direct include of the file as per my first post. With the following configuration, the language menu will show up wherever the component is included on the page:
LanguageSwitch::configureUsing(function (LanguageSwitch $switch) {
$switch
->locales(['en','es'])
->renderHook(PanelsRenderHook::USER_MENU_PROFILE_AFTER)
->labels([
'en' => 'English (EN)',
'es' => 'Castellano (ES)',
]);
LanguageSwitch::configureUsing(function (LanguageSwitch $switch) {
$switch
->locales(['en','es'])
->renderHook(PanelsRenderHook::USER_MENU_PROFILE_AFTER)
->labels([
'en' => 'English (EN)',
'es' => 'Castellano (ES)',
]);
3 replies
FFilament
Created by Shroomteller on 2/23/2024 in #❓┊help
Translatable plugin locale switcher not working
I've not figured this out yet, but I plan on looking into it and posting my solution when I get time.
7 replies
FFilament
Created by Shroomteller on 2/23/2024 in #❓┊help
Translatable plugin locale switcher not working
I think the problem is coming from the fact that I'm using a relationship. I've been able to duplicate this problem in a fresh installation with no other plugins. The "meta" relationship works fine without the translatable plugin, but I'm not sure how to use it with the plugin, e.g. in the $translatable array, should I put "meta" or meta.title, meta.description, etc.? Also, should I change what trait I'm using in the resource pages because it's a relationship?
7 replies
FFilament
Created by Shroomteller on 2/23/2024 in #❓┊help
Translatable plugin locale switcher not working
Yes, I followed the instructions in the documentation from Filament and Spatie, including adding the proper traits to the resource pages.
7 replies
FFilament
Created by Joshua Dempsey on 12/31/2023 in #❓┊help
Disable reordering when user not on "all" tab
You have to use a closure to pass the boolean value, like so: ->reorderable('sortable_column', fn (Table $table): bool => $table->getLivewire()->activeTab !== 'all') I've tested it and this works for me, so all that's required is to customize the logic inside the closure.
2 replies