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 Laravel

Locale Laravel Laravel Package

uselocale/locale-laravel

A Laravel localization package for multilingual apps, with locale detection, language switching, localized routes, and a simple configurable API that integrates cleanly with Laravel middleware and views.

View on GitHub
Deep Wiki
Context7

Manage translations with Locale and smoothly synchronize them with your project using our simple package commands.

Frequently asked questions about Locale Laravel
How do I install uselocale/locale-laravel in a Laravel app?
Install the package with Composer using composer require uselocale/locale-laravel. Then publish the package configuration, register the Locale middleware where appropriate, and configure your supported locales. Confirm that the package Composer constraints match your Laravel and PHP versions before rolling it out.
Does uselocale/locale-laravel support Laravel 10?
The 2.0.1 release specifically notes Laravel 10.x compatibility, so it is the version to evaluate for a Laravel 10 application. Because the release note is sparse, verify the package Composer constraints and test it in your actual Laravel 10 skeleton. Also confirm whether older Laravel versions are supported if you are not yet on Laravel 10.
What PHP version do I need for Locale Laravel 2.0.1?
The provided context does not document an explicit PHP support matrix for 2.0.1. Check the package composer.json for its php and illuminate dependency constraints before installing. For a typical Laravel 10 application, validate against PHP 8.1 or newer and run your test suite after installation.
How does Locale detect the user's language in Laravel?
The package is designed around Laravel localization concepts and middleware-based locale handling. Depending on its configuration, detection may use session, cookie, URL locale parameter, Accept-Language, or a custom resolver, so confirm the exact behavior in the package docs. Test detection, persistence, and fallback behavior in your application before production.
How do I switch languages with uselocale/locale-laravel?
Configure your supported locales and use the package middleware or API to switch the active locale. Persistence usually depends on the package configuration, such as session or cookie storage, so verify how the selected language survives requests. Run regression tests around locale switching, fallback, and translated validation messages.
Can Locale Laravel localize routes?
Yes, the package blurb lists localized routes as a feature alongside locale detection and language switching. Validate how locale parameters are generated and resolved in your Laravel routes, especially with route caching enabled. Test route generation for every supported locale before deployment.
How do I publish the Locale Laravel configuration file?
After installing the package, use Laravel's vendor:publish command to publish its config file. Then review the locale list, detection settings, middleware registration, and any storage or routing options. Recheck configuration after upgrades because major versions may change config keys or defaults.
Is Locale Laravel 2.0.1 a breaking change from 1.x?
2.0.1 is described as a patch-level update from 2.0.0, but moving from 1.x to 2.x should be treated as a major-version migration. Review the 2.0.0 changelog or upgrade notes, audit config and middleware changes, and stage the rollout. Do not assume 1.x configuration will work unchanged on 2.x.
What changed in uselocale/locale-laravel 2.0.1?
The only noted change for 2.0.1 is Laravel 10.x compatibility, which suggests a compatibility-focused patch rather than an architectural shift. Confirm whether it only adjusts Composer constraints or also includes code changes for Laravel 10. Run targeted localization regression tests rather than treating the patch as proof of production readiness.
Is uselocale/locale-laravel production ready for multilingual Laravel apps?
The technical risk is low to moderate: Laravel 10 compatibility is a positive signal, but the release note does not detail test coverage, CI, or the full support matrix. Validate maintainer activity, license, security policy, and compatibility with your caching and routing setup. If you use Laravel Octane or long-running workers, specifically test that locale state does not leak across requests.
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.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package