© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Shroomteller

Filament Language Switch not visible outside panels

Hello, I'm successfully using this language switcher in panels, but in the frontend -- outside of panels -- it's not displaying unless I manually add the component, like so:

<livewire:filament-language-switch key='fls-outside-panels' />
<livewire:filament-language-switch key='fls-outside-panels' />


This causes the language switcher to show up in the bottom-right corner of the page, and it still works, but I want it to continue showing up in the Filament user menu, which I'm also rendering on my frontend outside of panels.

Here is how I've configured the plugin in the boot() method of AppServiceProvider.php:

LanguageSwitch::configureUsing(function (LanguageSwitch $switch) {
            $switch
                ->locales(['en','es'])
                ->renderHook(PanelsRenderHook::USER_MENU_PROFILE_AFTER)
                ->labels([
                    'en' => 'English (EN)',
                    'es' => 'Castellano (ES)',
                ])
                ->visible(outsidePanels: true)
                ->outsidePanelRoutes([
                    'home',
                ])
                ->outsidePanelPlacement(Placement::BottomRight);
        });
LanguageSwitch::configureUsing(function (LanguageSwitch $switch) {
            $switch
                ->locales(['en','es'])
                ->renderHook(PanelsRenderHook::USER_MENU_PROFILE_AFTER)
                ->labels([
                    'en' => 'English (EN)',
                    'es' => 'Castellano (ES)',
                ])
                ->visible(outsidePanels: true)
                ->outsidePanelRoutes([
                    'home',
                ])
                ->outsidePanelPlacement(Placement::BottomRight);
        });


I'm including the FIlament user menu like so in my frontend layout:
<x-filament-panels::user-menu />
<x-filament-panels::user-menu />
.

I've gotten other things working outside of panels, like dropdown menus and the light/dark mode switcher, but this language switcher eludes me.
GitHub
GitHub - bezhanSalleh/filament-language-switch: A versatile and use...
A versatile and user-friendly plugin designed for Filament Panels. - bezhanSalleh/filament-language-switch
GitHub - bezhanSalleh/filament-language-switch: A versatile and use...
Solution
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)',
                ]);
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Translation with "bezhansalleh/filament-language-switch"
FilamentFFilament / ❓┊help
3y ago
#language-switch
FilamentFFilament / ❓┊help
2y ago
Language Switch
FilamentFFilament / ❓┊help
3y ago
filament-panels labels not "rendering"
FilamentFFilament / ❓┊help
2y ago