Download the PHP package craft-forge/filament-language-switcher without Composer
On this page you can find all versions of the php package craft-forge/filament-language-switcher. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download craft-forge/filament-language-switcher
More information about craft-forge/filament-language-switcher
Files in craft-forge/filament-language-switcher
Package filament-language-switcher
Short Description Zero-config language switcher for Filament admin panels. Automatically scans available translations, renders dropdown with country flags, persists selection via sessions.
License MIT
Homepage https://github.com/craft-forge/filament-language-switcher
Informations about the package filament-language-switcher
Filament Language Switcher
A simple and elegant language switcher plugin for Filament admin panels. Automatically detects available Filament translations or allows custom language configuration with optional flag icons. Supports auth pages, cookie persistence, and locale change events.
Demo
Installation
| Plugin Version | Filament Version | PHP Version |
|---|---|---|
| 1.x | 3.x, 4.x, 5.x | > 8.1 |
1. Install the package via Composer:
2. Register the plugin in your Filament panel configuration (e.g. AdminPanelProvider):
The plugin will automatically detect available Filament language files and display them in a dropdown menu.
Configuration
Locales
By default, the plugin auto-detects available Filament language files. To define the locale list manually, pass it to locales() - choose one of three formats:
Locale codes - names and flags are resolved automatically from the built-in dictionary (200+ languages):
Full control - specify name and flag per locale. Flag codes reference: https://flagicons.lipis.dev.
Dynamic - load locales at runtime (e.g. from a database):
Remember Locale
Store the selected locale in a cookie to persist across browser sessions (e.g. after logout):
Custom Render Hook
Change where the language switcher appears in the panel:
Popular placements:
USER_MENU_BEFORE— before the user menu (default)USER_MENU_PROFILE_AFTER— after user profile in dropdownUSER_MENU_AFTER— after the user menuSIDEBAR_FOOTER— at the bottom of sidebarFOOTER— in the page footer
All available render hooks: https://filamentphp.com/docs/5.x/advanced/render-hooks
Show on Auth Pages
Display the language switcher on login, register, and password reset pages:
Hide Flags
Display only language names without flag icons:
Event
The plugin dispatches a LocaleChanged event whenever a user switches locale, providing both the new and previous locale:
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-language-switcher with dependencies
filament/filament Version ^3.0|^4.0|^5.0
spatie/laravel-package-tools Version ^1.16
stijnvanouplines/blade-country-flags Version ^1.0.6