wirelab/language_switcher-plugin
A lightweight language switcher plugin for Laravel and Filament applications. It adds a ready-to-use switcher UI for moving between your configured locales, letting visitors and panel users change language on the fly without writing custom code.
Verdict: do not adopt as a dependency. Use as reference material or a fork candidate only if a Wirelab CMS instance is already in production.
Architecture fit
This is not a general-purpose Laravel package — it is a plugin in the Wirelab CMS sense, meaning it registers through Wirelab's own plugin loader rather than being a standalone Composer library with a self-contained service provider. That coupling is the central architectural issue: the package's value is inseparable from a host CMS that itself shows no sign of active maintenance. For a standard Laravel application (native lang/ directories, app()->setLocale(), locale middleware), the plugin's core concern is already ~50 lines of framework-native code. There is no architectural gap here worth importing a dependency to fill.
Integration feasibility
Low on modern stacks, plausible only on legacy ones. A release dated November 2017 places it in the Laravel 5.5/5.6 and PHP 7.0/7.1 era. Expect composer require to fail on Laravel 9/10/11 and PHP 8.1+ on constraint resolution alone, before any runtime issues surface. Feasibility is therefore binary: either the target app is a Wirelab CMS on PHP 7.x (in which case it works but inherits the CMS's own EOL risk), or it is anything else (in which case reimplementation is faster than adaptation).
Technical risk
Vary headers, locale-prefixed canonical URLs).Key questions
app()->getLocale()) or maintain its own locale store? Fork cost depends entirely on this.composer.json constraints on php, laravel/framework, and the Wirelab core?Stack fit
Assumes Laravel 5.x, PHP 7.x, and the Wirelab plugin contract. It does not fit Laravel 10/11 or PHP 8.2+, and it will not fit a headless/API-first architecture where locale is negotiated via Accept-Language or a client-side store. Confirm fit by running composer why-not wirelab/language_switcher-plugin against the target app's lockfile — if that resolves cleanly, the app is legacy enough that the CMS is the real risk, not the plugin.
Migration path Two viable paths, and the default should be the second:
App::setLocale() and URL::defaults(), convert views to Blade components, drop Wirelab-specific registration hooks, add PHPUnit coverage for locale persistence and redirect behaviour. Realistically 3–5 engineering days plus test scaffolding.Accept-Language negotiation), a route/URL strategy, and a single Blade component covers the entire feature set. Estimate 1–2 days for a mid-level Laravel developer, with no third-party ownership burden and full compatibility with the current framework.Compatibility
The decisive compatibility axis is not the package but our URL strategy. Decide once: locale-prefixed routes (/en/..., /fr/...), subdomains, or session-only switching. Session-only switching is the cheapest and the worst for SEO; locale-prefixed routing requires URL::defaults() and middleware ordering care. Also verify interaction with any existing translation-management layer (spatie/laravel-translatable, Laravel's own lang/), since two locale stores is a guaranteed defect source. Flag assets should be replaced with an icon set or CDN-hosted SVG — bundled national flags for languages are a known UX and maintenance problem.
Sequencing
hreflang/canonical output together — they are one unit of work, not three.Vary behaviour) before rollout; locale cookies and full-page caches interact badly and this is where most regressions appear.Maintenance Owning this package means owning it outright. Archived status converts every future problem — PHP 8.3 deprecations, Laravel major upgrades, a CVE in a transitive path — into internal work with no upstream to lean on. A fork carries an estimated 3–5 days of initial modernization and 1–2 days per year of upgrade tax, plus the ongoing cost of context-switching into unfamiliar 2017-era code. The native reimplementation carries roughly the same initial cost and near-zero ongoing tax. On maintenance economics alone, reimplementation wins.
Support There is no support surface: no vendor, no maintainer activity, no issue triage, no community (zero stars, zero dependents means zero Stack Overflow answers). Internal ownership of the code is non-negotiable on day one, including a named owner and a documented decision record. This should be stated explicitly to stakeholders — "we are adopting an unmaintained dependency" is a risk acceptance, not an implementation detail.
Scaling
Runtime performance is a non-issue. A language switcher is a static render of a handful of links plus a session/cookie read; it will not appear in any profile. The scaling concerns are all at the edges: CDN caching correctness when locale is cookie-derived (must emit Vary: Cookie or move locale into the URL), and locale negotiation cost on cold requests (trivial, but cache the supported-locale list rather than recomputing from config on every request).
Failure modes
hreflang, canonical URLs pointing at the default locale, or non-indexable locale variants. Silent, compounding, and expensive to detect late.Ramp-up The domain logic is easy — a competent Laravel developer understands localization in an afternoon. The difficulty is entirely artificial: understanding Wirelab's plugin registration contract, which is undocumented and abandoned. Expect 1–2 days of archaeology for a fork versus a few hours to build the native equivalent from scratch. Onboarding a second engineer to a fork roughly doubles that cost, because there is no upstream documentation to read and no community to ask.
Bottom line: the opportunity score (8.81) is the most useful signal in this dataset — it says the problem (flexible, SEO-correct language switching) is worth solving, while the package itself (0.045) is not worth depending on. Fund a 1–2 day native build, archive this repository as a reference for the UX patterns it enumerates, and do not add it to composer.json.
How can I help you explore Laravel packages today?