Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Language Switcher Laravel Package

craft-forge/filament-language-switcher

View on GitHub
Deep Wiki
Context7
v1.2.1

Full Changelog: https://github.com/craft-forge/filament-language-switcher/compare/v1.2.0...v1.2.1

Fixed

  • Dropdown not opening on iOS devices
  • Flag icon not updating after language switch in SPA mode
  • Dropdown not closing after selection in SPA mode
  • Nested button in trigger causing touch event conflicts on mobile

Changed

  • Removed client-side filament-locale-changed JS event (unreliable with SPA)

Added

  • Live demo link in README
v1.2.0

New Features

  • Dynamic locales via Closure — load languages from a database or any dynamic source: ->locales(fn () => Language::pluck('code')->toArray())

  • Simplified locale syntax — pass plain language codes instead of arrays: ->locales(['en', 'fr', 'de'])

  • Show on auth pages — display the language switcher on login, register, and password reset pages with a single method: ->showOnAuthPages()

  • Cookie persistence — remember the selected locale across browser sessions: ->rememberLocale()

  • LocaleChanged event (PHP) — react to locale changes on the backend with both new and previous locale: Event::listen(LocaleChanged::class, function (LocaleChanged $event) {});

  • Browser event (JavaScript) — filament-locale-changed event dispatched after locale switch: window.addEventListener('filament-locale-changed', (e) => {});

Improvements

  • Locale validation — invalid locale codes (e.g. 'en, pl' instead of 'en', 'pl') now throw a clear error message
  • Graceful SVG fallback — if a flag icon is not found, a fallback icon is shown instead of crashing
v1.1.0
v1.0.1

Fixed

  • Fixed "Session store not set on request" error when SetLocale middleware runs before StartSession middleware
v1.0.0
  • Automatic Detection: Scans available Filament translations automatically
  • Flag Icons: Beautiful country flag icons with comprehensive language-to-country mappings
  • Session Management: Persistent language selection using Laravel sessions
  • Easy Integration: Simple one-line plugin registration
  • Customizable: Optional custom language lists and flag display settings
  • Universal Compatibility: Works with both Filament 3.x and 4.x
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony
spatie/flare-daemon-runtime