Weave 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 Browser Locale Laravel Package

chaim-chv/filament-browser-locale

A Filament plugin that detects each visitor's preferred browser language and applies it as the application locale automatically. Includes middleware, configurable locale mapping, and seamless integration with Filament panels for multilingual admin interfaces.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: A small Filament plugin for browser locale negotiation. It fits Laravel localization only if it resolves the locale early enough in the request lifecycle and before Filament/Livewire renders locale-sensitive UI. Good fit for simple single-panel admin apps; weaker fit for multi-tenant, multi-panel, API-first, or apps with existing per-user locale persistence.
  • Integration feasibility: Likely low-code: composer require chaim-chv/filament-browser-locale:^1.2, register the plugin/service provider, configure supported locales, and verify middleware ordering. However, v1.2.0 release notes do not document exact Filament panel registration, middleware priority, config keys, or fallback contract. Source/README review is required before committing.
  • Technical risk: Medium. The package is v1.x and appears single-maintainer. The new Pest/Testbench suite (19 tests / 22 assertions) and CI matrix are positive, but they were added only in this release, implying earlier versions had little automated coverage. The regional-locale bug fix is a real correctness change: prior behavior failed to match en-US when Symfony normalized to en_US under normalize(false). That means existing deployments may see different locale resolution after upgrade. Filament 5, Laravel 13, and Livewire 4 support should be treated as compatibility claims until the CI matrix is confirmed to test them, not just allow them in Composer constraints.
  • Key questions: Does it call app()->setLocale() globally per request, and at what middleware priority? Does it persist locale in session/cookie, or renegotiate every request? How does it interact with Filament user locale preferences? Does it parse Accept-Language q-values, wildcards, and fallbacks correctly? Is there a configurable allowlist of supported locales? Does it run on Livewire subsequent requests or only initial page loads? What is the license and support/versioning policy? Are Laravel 13 and Livewire 4 actually tested, or only permitted by Composer?

Integration Approach

  • Stack fit: Suitable for Laravel 11.28+/12 and Filament 4/5 apps using Livewire 3/4, especially small-to-medium admin panels that want automatic browser locale selection without custom middleware. Less suitable where localization is business-critical, fallback chains are complex, or user-selected locale must always win.
  • Migration path: Add composer require chaim-chv/filament-browser-locale:^1.2; register per package docs; configure supported locales and normalization behavior; verify middleware runs before Filament panel middleware. If upgrading from an earlier release, explicitly audit regional locale behavior because the en-US / en_US fix changes matching outcomes. Stage first and consider a feature flag.
  • Compatibility: Composer constraints claim Laravel 11.28+, 12, 13; Filament 4/5; Livewire 3/4. The release notes confirm a PHP 8.2–8.4 × Filament 4/5 CI matrix, but do not state full Laravel 12/13 or Livewire 3/4 coverage. Treat Filament 5 and Laravel 13 as forward-compatibility until verified. Test Filament panel boot, Livewire navigation, and locale-sensitive components.
  • Sequencing: 1) Review source, README, license, and issue history. 2) Run package tests locally. 3) Add to a non-critical panel. 4) Instrument locale resolution and fallback paths. 5) Test regional locales such as en-US, pt-BR, zh-Hant-TW, and q-value headers like fr;q=0.8,en;q=0.9. 6) Validate against existing user-locale behavior. 7) Roll out to production panels and pin ^1.2.

Operational Impact

  • Maintenance: Low-to-moderate. Small surface area, but single-maintainer dependency. The new Pest suite and CI matrix reduce risk, but prior lack of tests is a caution. Pin minor versions and monitor Filament/Laravel compatibility releases.
  • Support: Likely community/open-source support via GitHub only, with no vendor SLA. Assign internal ownership for locale allowlist, fallback rules, and expected behavior. Document the supported locale matrix.
  • Scaling: Per-request locale negotiation is cheap and unlikely to be a throughput bottleneck. The real scaling concern is correctness across many locales and regions, especially in multi-tenant or multi-panel setups. Cache configuration/allowlists if needed.
  • Failure modes: Middleware ordering prevents locale application before Filament renders; unsupported headers fall back unexpectedly; regional normalization mismatches persist for locales outside the fixed case; Livewire navigation may not renegotiate locale; plugin behavior may conflict with user-selected locale in profile/session; early Filament 5/Livewire 4 adoption may expose integration gaps.
  • Ramp-up: Low for a Laravel developer to install and configure. Moderate for TPM/ops to understand Accept-Language parsing, Symfony locale normalization, Filament boot order, and Livewire request lifecycle. Allocate a short spike and a locale test matrix before production.
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.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator