github bezhanSalleh/filament-language-switch 5.0.0-beta.1

pre-release13 hours ago

What's Changed

v5.0.0

Filament v5 support. The rendering internals have been rewritten — the plugin now classifies render hooks into contexts (topbar, sidebar, user-menu, outside-panel) and picks the matching trigger design automatically. Trigger styling, item display, display mode, and outside-panel placement are now controlled through dedicated enums instead of loosely typed strings and booleans. Most v4 configurations work unchanged.

Breaking changes

Renames

v4 v5
->flagsOnly() ->itemStyle(ItemStyle::FlagOnly)
Placement::TopLeft / TopRight Placement::TopStart / TopEnd
Placement::BottomLeft / BottomRight Placement::BottomStart / BottomEnd

Default changes

Setting v4 v5 Restore v4
maxHeight 'max-content' '18rem' ->maxHeight('max-content')
renderHook global-search.after always Context-aware ->renderHook(PanelsRenderHook::GLOBAL_SEARCH_AFTER)
outsidePanelsRenderHook body.start always Derived from placement + mode ->outsidePanelsRenderHook(PanelsRenderHook::BODY_START)

Everything else from v4 — visible(), locales(), flags(), labels(), renderHook(), outsidePanelPlacement(), excludes(), circular(), nativeLabel(), displayLocale(), userPreferredLocale() — keeps its v4 signature.

What's new

  • Trigger customizationTriggerStyle enum via ->trigger(style:, icon:). Auto-adapts to the render context.
  • Item styleItemStyle enum (FlagWithLabel, FlagOnly, AvatarWithLabel, AvatarOnly, LabelOnly) via ->itemStyle().
  • Modal display mode->displayMode(DisplayMode::Modal) with grid columns, slide-over, heading, icon, and width.
  • Outside panels rebuiltPlacementMode (Static, Pinned, Relative) with auto-derived render hooks and user-menu auto-docking.
  • Smart hook classification — trigger design adapts automatically per render hook context.
  • Dropdown placement->dropdownPlacement() to control dropdown direction.
  • Inline Blade component<x-language-switch::inline /> for embedding in custom views.
  • Developer Control Panel->controlPanel() for live configuration in local dev.

See the README for full usage and examples.

Full Changelog: 4.3.0...5.0.0-beta.1

Don't miss a new filament-language-switch release

NewReleases is sending notifications on new releases.