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

Laravel L10N Laravel Package

goodcat/laravel-l10n

A Laravel localization package for building multilingual apps, with helpers for locale detection, language switching, and localized routes/URLs. Lightweight and easy to integrate into existing Laravel projects.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature scoping for i18n launches: Use this package as the reference implementation when deciding how much localization infrastructure to build in-house versus adopt. It encodes an opinionated model (locale resolution, translation storage, fallback behavior), so the PM decision becomes "adopt these conventions and ship faster" rather than "spec a bespoke localization layer." v0.5.3 broadens that model in a product-relevant way: it now resolves a ranked list of preferred locales from the browser's Accept-Language header and matches the best available one, which is the behavior users actually expect when they arrive with a mixed-language preference list.
  • Locale-switching UX is now in scope (new): The new RedirectToPreferredLocale middleware performs a once-per-session redirect to the user's preferred locale while preserving explicit locale switches. That converts "remember and honor the user's language choice" from a custom feature into a supported one — a real scope reduction for any product where language preference must persist across sessions without fighting the user when they deliberately switch.
  • Build vs. buy: At 17 stars, zero dependents, and a single maintainer, this is a build-on-top or seed dependency, not a strategic vendor. It reduces effort for a first localization milestone but does not remove the need for a long-term ownership plan; budget engineering time to fork or replace it. The v0.5.3 changes reinforce this: the package is still actively evolving its public API (config key rename, event payload change, resolver return-type change), so the fork-and-pin cost is real but the cost of tracking upstream on a live API is now visibly non-trivial.
  • Roadmap sequencing: The opinionated nature means adopting it is a near-irreversible architectural commitment for translation storage and locale routing. That makes it a Phase 1 decision with Phase 2 lock-in risk — plan it before content and translation-vendor contracts are signed, not after. Note that v0.5.3 is a breaking release for anyone already on 0.5.x: config('app.preferred_locale') becomes config('app.preferred_locales'), LocaleResolver::resolve() may now return a list, and the PreferredLocaleUpdated event's $locale/$previousLocale become $locales/$previousLocales. If we adopt, we inherit this cadence of breaking minor releases; scope migration work accordingly.
  • Use cases it fits: Internal tools, admin panels, B2B dashboards, and MVPs shipping to 2–5 locales where the team wants Laravel idioms rather than a translation-management platform. It now fits somewhat better for Inertia/Vue/React front ends: the exported Wayfinder LocalizedRoutes type and fixed TypeScript signatures (required/optional args and query options preserved) mean typed, locale-aware route helpers are a supported path rather than a hand-rolled wrapper.
  • Use cases it does not fit: Consumer apps needing translator workflows, TMS integration (Crowdin, Lokalise, Phrase), per-locale content publishing, or >10 locales with heavy reviewer coordination. Also note the deprecation of SessionLocale in v0.5.3 — session-managed locale preferences are now explicitly "bring your own LocaleResolver," so a product that needs per-user stored language preference (a database column, a profile setting) must plan custom resolver work rather than assume it is provided.
  • One less reason to build a redirect layer (new): If a roadmap item is "don't nag users about language on every visit, but do suggest the right one on first arrival," that item is now largely covered by the middleware plus getPreferredLocales() / optional $locales argument. Conversely, if the roadmap needs geo-IP-based or account-based locale selection, that remains custom.

When to Consider This Package

Consider adoption when:

  • The product is Laravel-only and the team is already fluent in the framework's conventions — the "opinionated" framing is a benefit only if you accept its opinions.
  • You need a localization foundation in weeks, not a translation operations platform.
  • The locale set is small and stable, with translations maintained by engineers or a small bilingual team.
  • You want browser-driven locale negotiation without writing it yourself (new): multiple Accept-Language entries, ranked matching against your supported locale list, and a once-per-session redirect that still respects a deliberate user switch. This is now the package's strongest single argument over native lang files.
  • You have a JS/Inertia front end (new): the exported LocalizedRoutes type and the TypeScript signature fixes make typed locale-aware route generation viable; without a typed front end, this benefit is moot.
  • You are comfortable pinning a version and doing your own security/dependency review; the MIT license and recent release (October 2026) are positive, but 17 stars and 0 dependents mean effectively no community stress-testing. The v0.5.3 API churn (config key rename, event payload change) is direct evidence that "pin a version" is a requirement, not a nicety.

Look elsewhere when:

  • Supply-chain risk is unacceptable: a single-maintainer package with no dependents is a bus-factor of one. For a revenue-critical surface, prefer Laravel's native lang files plus a commercial TMS, or a package with an active maintainer base.
  • Translators are non-technical stakeholders: you need a UI, review states, and string-freeze workflows that this package likely does not provide.
  • You need runtime locale negotiation at scale: CDN-level locale routing, geo-based fallback, or A/B testing of localized copy implies a different layer. The new middleware is session-based and app-level, not edge-level.
  • You need account-level or persisted language preference (new/expanded): SessionLocale is deprecated and the once-per-session redirect keys off the session, not a user record. Products where language is a persisted profile setting will be writing a custom LocaleResolver and probably a custom persistence layer. That is fine, but it is no longer "free."
  • You already shipped against 0.5.2 or earlier (new): budget a migration for the preferred_locale → preferred_locales config rename and the event payload shape change before taking any further upgrades. Do not upgrade mid-sprint on a surface with live users.
  • Compliance or regulatory localization (legal, medical, regulated finance) requires audited wording control.
  • Non-Laravel services exist in the stack — you would end up with a Laravel-specific convention that the rest of the platform cannot reuse.

Mitigation if you proceed: fork it internally, vendor the source, add a named internal owner, pin to an exact version, and write a two-page exit plan for migration to native Laravel lang files plus a small custom resolver. Given the v0.5.3 breaking changes, also add a standing checklist item: read the changelog for every bump and treat every 0.x minor as potentially breaking.

How to Pitch It (Stakeholders)

For executives: This is a small, MIT-licensed Laravel component that lets us stand up basic app localization without custom engineering. The latest release adds the behavior users notice most — detecting the visitor's browser language, suggesting it once, and then respecting whatever they choose — plus typed route helpers for our front end. Those are features we would otherwise build. The trade-off is unchanged and worth restating: it is a community package with minimal adoption and it just shipped breaking API changes, so we would treat it as a starting point we own, not a platform we depend on. Recommendation: timebox a two-week proof of concept against our top locales, covering browser negotiation and locale-switch persistence, then decide whether to adopt, fork, or fall back to Laravel's built-in translation files.

For engineering: The package is opinionated, so adopting it means accepting its locale-resolution and translation-storage conventions. Expect to review the source, pin a version, and own upgrades — there is no community buffer at 17 stars and zero dependents, and v0.5.3 confirms we should treat every 0.x minor as potentially breaking. Concretely in this release: config('app.preferred_locale') is replaced by config('app.preferred_locales'); LocaleResolver::resolve() may now return an ordered list rather than a single locale; PreferredLocaleUpdated now carries $locales/$previousLocales instead of $locale/$previousLocale; SessionLocale is deprecated in favor of a custom resolver. New surface to evaluate: RedirectToPreferredLocale middleware (once-per-session, preserves explicit switches), getPreferredLocales() and the optional $locales argument for best-match selection, and the exported Wayfinder LocalizedRoutes type with corrected TypeScript signatures for required/optional args and query options. Upside is that it removes boilerplate and gives us a consistent pattern across services; downside is potential lock-in, single-maintainer risk, and a live breaking-change cadence. Please assess the diff against native lang files before we commit, and name an internal owner.

For design/content: Localization conventions will be set by this package's defaults, which may constrain string formatting, pluralization, and fallback display. One behavior change is worth a design decision: the app will now pick the best match from the user's full browser language list and, once per session, redirect first-time visitors to it — so the user's first impression of language is inferred, not chosen. Decide whether that redirect is desirable for our audience (it usually is for consumer-facing, less so for internal tools where a URL or account setting should win) and make sure a deliberate switch is never overridden. Loop content in before we commit so we don't hard-code assumptions we later have to unwind.

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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle