longman/laravel-multilang
A Laravel package for building multilingual sites with localized routes, language switching, and translation helpers. It simplifies managing URL slugs and locale-aware content, making it easy to serve users in multiple languages.
Architecture fit
Multilang facade/singleton, a locale-negotiation middleware, and a config file. It integrates at the HTTP kernel and container level, which is exactly where locale resolution belongs in a Laravel app.Accept-Language, optional GeoIP) and locale-aware URL generation. It is not a content-translation system — it does not store translated attributes or provide an admin/editorial workflow. Treat it as a routing/negotiation layer, not an i18n platform.App::setLocale / lang files, it composes cleanly with whatever translation-storage approach we pick later (lang files, spatie/laravel-translatable, or a CMS).Integration feasibility
composer require, publish config, register middleware, wrap routes in a {locale}-prefixed group, and use the facade's localized-URL helpers. Realistically a one-to-two-day spike, not a project.Technical risk
Accept-Language q-values, plus hide_default_locale redirect behavior. Any of these becoming our problem permanently is a real cost.Key questions
route:cache and Laravel Octane's long-lived workers without leaking locale state between requests?Stack fit
mcamara/laravel-localization, which has materially more adoption and an overlapping feature set. Run a short bake-off rather than a sole-source decision.Migration path
LocaleResolver and LocalizedUrlGenerator interface with this package as the first implementation. Call sites depend on our interface, not on the Multilang facade. That converts a dependency decision into a reversible one.Compatibility
illuminate/* constraints, PHP version, and interaction with route:cache, Octane, and middleware ordering relative to StartSession, auth, and route-model binding.Sequencing
Maintenance
Support
Scaling
Failure modes
hide_default_locale creating duplicate content and missing canonical/hreflang tags — an SEO regression that surfaces weeks later.Ramp-up
Accept-Language → default) and encode it in tests. That documentation, not the package, is the durable asset.How can I help you explore Laravel packages today?