Download the PHP package php-monsters/laravel-accept-language-middleware without Composer
On this page you can find all versions of the php package php-monsters/laravel-accept-language-middleware. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download php-monsters/laravel-accept-language-middleware
More information about php-monsters/laravel-accept-language-middleware
Files in php-monsters/laravel-accept-language-middleware
Package laravel-accept-language-middleware
Short Description Laravel middleware for setting application locale based on HTTP Accept-Language header
License MIT
Homepage https://github.com/php-monsters/laravel-accept-language-middleware
Informations about the package laravel-accept-language-middleware
Laravel "Accept-Language" middleware
Laravel middleware for automatically setting application locale based on HTTP "Accept-Language" header
Requirements
- PHP 8.3 or higher.
- Laravel ^12.0 or higher
Installation
You can install the package via composer:
Usage
Register \PhpMonsters\LaravelAcceptLanguageMiddleware\Middleware::class middleware in application's HTTP Kernel.
You can install it as global middleware in Kernel's $middleware property:
You can install it to specific middleware groups in Kernel's $middlewareGroups property:
Or you can install is as route middleware in Kernel's $routeMiddleware and use it manually in routes:
Kernel:
Route file
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Credits
- Aboozar Ghaffari
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-accept-language-middleware with dependencies
illuminate/contracts Version ^12.0
illuminate/http Version ^12.0
illuminate/support Version ^12.0