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
Locale Bundle

Locale Bundle Laravel Package

phospr/locale-bundle

A Symfony bundle for locale management in PHP applications. It centralizes locale configuration and provides services and helpers for handling available locales, making it easier to build consistent multilingual Symfony projects. Use it to organize locale settings and expose locale data to services...

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Locale Bundle
Can I use phospr/locale-bundle in a Laravel application?
Not directly. The package is a Symfony bundle published under a Symfony-style namespace, and its service wiring depends on Symfony's kernel boot and dependency-injection container compilation, which Laravel never runs. Composer will install it, but there is no Laravel service provider, config publishing, facade, or middleware in the package. Making it work in Laravel would require a shim that re-registers its services into Laravel's container, or a rewrite.
Does phospr/locale-bundle support Laravel 10, 11, or 12?
There is no evidence of Laravel support in any version. The last release was on 2020-12-30, well before Laravel 10, 11, and 12 existed, and nothing in the package targets Laravel's service-provider model. Treat Laravel compatibility as unverified and assume it will not work without custom integration code.
What does phospr/locale-bundle actually do?
It centralizes locale configuration in a Symfony application and exposes available locales to services and templates through bundle-provided helpers. In practice it is a thin cross-cutting concern covering locale settings and access, not a full routing or translation system. Most modern frameworks now handle this natively, which makes the package largely substitutable.
How do I install phospr/locale-bundle with Composer?
You would require it with composer require phospr/locale-bundle under the MIT license. On Symfony you would then register the bundle in your kernel, which is the normal bundle workflow. On Laravel the install step alone accomplishes nothing, because no provider is auto-discovered and no service bindings are registered.
Is phospr/locale-bundle still maintained?
The signals point to no. It has zero stars, zero dependents, and a single historical release ending 2020-12-30, which suggests a personal or side project without an active maintainer community. There is no visible security response process or issue triage, so the effective bus factor is one or zero.
What are the alternatives to this package for locale management in Laravel?
Laravel already covers most of this ground with app()->setLocale(), the locales list in config/app.php, locale-aware route helpers, and translation fallbacks. For URL-prefix locale routing, mcamara/laravel-localization is a common community choice with active maintenance. Both are safer defaults than adapting an unmaintained Symfony bundle.
Is phospr/locale-bundle compatible with PHP 8.1, 8.2, and 8.3?
That is unconfirmed. A release from December 2020 predates broad PHP 8.x adoption, and older bundles frequently break on stricter typing, nullable deprecations, and ReturnTypeWillChange requirements. Before relying on it, run the package's own code against your locked PHP and framework versions rather than trusting the version constraints.
How would I integrate phospr/locale-bundle into Laravel if I had to?
You would wrap the bundle's services in a Laravel service provider and move locale detection into middleware, replacing the Symfony lifecycle hooks it expects. That means rewriting the container wiring rather than reusing it, which is often more work than reimplementing the behavior. Only do this if a specific named behavior from the bundle is not otherwise available to you.
Is it safer to fork or vendor phospr/locale-bundle instead of depending on it?
For an abandoned package with a permissive MIT license, extracting the relevant classes into an internal package is usually the better path. Snapshot the locale detection order, storage, and header handling, rewrite the Symfony-specific wiring to your framework's idioms, and add tests that pin the behavior. That converts an unmaintained 2020 dependency into an artifact you control and can upgrade on your own schedule.
How should I test locale behavior if I do integrate this package?
Write tests around the behaviors you actually need, such as detection order, session persistence, and fallback selection, rather than around the bundle's internals. That way a future PHP or framework upgrade tells you whether your locale contract still holds. If you vendor the code, keep those tests in your own repository so upstream abandonment cannot break them silently.
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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core