bezhanSalleh / filament-language-switch

A versatile and user-friendly plugin designed for Filament Panels.
MIT License
210 stars 45 forks source link

Place switch inside user menu #92

Closed diazwatson closed 2 months ago

diazwatson commented 5 months ago

I am opening this here as the question link redirects me to a 404 page for some reason.

Is there a way to place the switch inside the user's menu as an extra option of even inside the user profile form to let users set their default language?

Screenshot 2024-04-11 at 14 09 42

JohnnyEvo commented 3 months ago

You can set renderHook :

        LanguageSwitch::configureUsing(function (LanguageSwitch $switch) {
            $switch->renderHook(PanelsRenderHook::USER_MENU_PROFILE_AFTER)
        });