badinansoft/nova-language-switch
A Laravel Nova tool that adds a language switcher to the Nova admin panel, letting you change the interface locale on the fly. Supports configurable languages, remembers the selection, and integrates cleanly with Nova's localization.
Architecture fit. This is an admin-chrome affordance, not infrastructure. Mechanically it is a Nova tool that renders a locale dropdown in the admin header and writes the selected locale somewhere the request pipeline reads (session by default). It translates nothing itself — it only influences which locale the application resolves on subsequent requests. Fit is therefore conditional on two facts: (1) Laravel Nova is the admin surface of record, and (2) the application actually honors the mechanism the package writes to. If either is false — API-only service, Filament or SPA admin, or a front end that resolves locale from users.locale while the package writes to session — there is no partial-value fallback. Roadmap-wise this belongs under "backoffice ergonomics," not "internationalization," and that framing is the TPM's first deliverable.
Integration feasibility. Mechanically trivial: composer require, service provider auto-discovers, register the tool in NovaServiceProvider::tools(), optionally publish a languages config map. The integration risk is not installation but the source-of-truth decision — session vs. users.locale vs. both — and ensuring the whole pipeline (web middleware, Nova middleware, queues, Octane, shared caches) honors it consistently. That decision, not the package, drives the schedule.
Technical risk.
Key questions.
App::setLocale(), or persist a user column — and which is authoritative on the next request?laravel/framework and laravel/nova? Does 3.0.0 properly declare Nova 5?StartSession and the cache middleware?Vary header?Stack fit. Requires Laravel + a paid Nova license + compatible framework constraints, with at least two locales and real translation files behind them. Non-starter for API-only services, SPA/Inertia front ends without server-resolved locale, teams on Filament or another admin panel, and any stack where Nova is not the back office.
Migration path. Additive and reversible. Install, register, pilot in a staging Nova panel. If the persistence model does not match the intended locale source of truth, vendor the tool class into app/Nova/Tools and adapt. For a package this small, forking is a realistic first option rather than a fallback, and it collapses the vendor-risk question in one move — near-zero exit cost is the core argument for proceeding.
Compatibility. Validate the constraint matrix against pinned Laravel and Nova minors before commitment. Critically, validate dependency direction: if the app resolves locale via middleware from users.locale but the package writes to session, the switch will appear to work inside Nova and silently no-op elsewhere. Confirm the configured language map maps to locales the app actually ships strings for — a dropdown full of untranslated codes is worse than no dropdown.
Sequencing.
Maintenance. Low ongoing effort, non-zero ownership risk. Budget a compatibility review at every Nova and Laravel major, and name an internal owner up front. Because upstream adoption is thin, the operative question is not "will the maintainer patch it" but "who on our side reads the ~200 lines when it breaks." A fork under an internal namespace is the durable posture.
Support. No vendor support, no SLA, will not clear enterprise procurement gates on its own. The dominant internal ticket will be user confusion: an admin flips language and expects content to change when only UI chrome does. A one-line tooltip ("changes interface language, not content") removes most of it, and a short note in the admin onboarding doc removes the rest. Ramp-up is under a day for a Laravel/Nova-fluent engineer — roughly half of that is the locale-source decision, not the package.
Scaling. Negligible compute — one session write per switch. Correctness, not throughput, is the scaling risk: under Octane or long-running workers a leaked locale contaminates subsequent requests; under shared caches, locale-variant responses must be keyed or varied correctly. With horizontally scaled sessions, a session-backed preference is only as durable as the session store — pin to Redis or persist to the user record if persistence matters.
Failure modes.
All four are detectable with one integration test plus one Octane test — cheap insurance at this size, and the TPM's ask to engineering should be exactly that: a gated pilot, two tests, and a documented locale source of truth, rather than a blanket rollout.
How can I help you explore Laravel packages today?