Skip to content

Releases: craft-forge/filament-language-switcher

v1.2.1

04 Mar 22:30

Choose a tag to compare

Full Changelog: 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 - Auth Pages & Cookie Persistence

08 Feb 13:50

Choose a tag to compare

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 Filament v5 support

26 Jan 22:16
083b31b

Choose a tag to compare

Merge pull request #4 from MominAlZaraa/main

updated composer to support filament v5.x

v1.0.1

05 Dec 01:24

Choose a tag to compare

Fixed

  • Fixed "Session store not set on request" error when SetLocale middleware runs before StartSession middleware

v1.0.0 - Initial Release

12 Sep 11:45

Choose a tag to compare

  • 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