Download the PHP package trin4ik/laravel-middleware-setlocale without Composer
On this page you can find all versions of the php package trin4ik/laravel-middleware-setlocale. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download trin4ik/laravel-middleware-setlocale
More information about trin4ik/laravel-middleware-setlocale
Files in trin4ik/laravel-middleware-setlocale
Download trin4ik/laravel-middleware-setlocale
More information about trin4ik/laravel-middleware-setlocale
Files in trin4ik/laravel-middleware-setlocale
Vendor trin4ik
Package laravel-middleware-setlocale
Short Description Laravel "SetLocale" middleware from user data, http headers, post data etc
License MIT
Homepage https://github.com/trin4ik/laravel-middleware-setlocale
Package laravel-middleware-setlocale
Short Description Laravel "SetLocale" middleware from user data, http headers, post data etc
License MIT
Homepage https://github.com/trin4ik/laravel-middleware-setlocale
Keywords trin4iklaravel-middleware-setlocale
Please rate this library. Is it a good library?
Informations about the package laravel-middleware-setlocale
Laravel Middleware SetLocale
Simple and stupid package for set locale from user data, http header, post data etc.
Installation
And add middleware to app/Http/Kernel.php
to needs routes middleware, or to global:
Usage
in .env
or config/setlocale.php
u can configure locale sniffer:
Key | Default | Description |
---|---|---|
SET_LOCALE_DEFAULT | en | Default locale |
SET_LOCALE_METHODS | get,header | U have 4 methods to sniff locale, from user data, from get or post fields or from custom header . The last method gets the highest priority |
SET_LOCALE_METHOD_USER | locale | User attribute, where sets locale data. Like User::find(1)->locale |
SET_LOCALE_METHOD_HEADER | x-locale | Custom http header, like HTTP_X_LOCALE |
SET_LOCALE_METHOD_GET | locale | Get param like /?locale=fr |
SET_LOCALE_METHOD_POST | locale | Post field like $request->post('locale') |
SET_LOCALE_ALLOW | en,ru | Allowed locales. others set the default |
Changelog
Please see CHANGELOG for more information what has changed recently.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- trin4ik
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-middleware-setlocale with dependencies
PHP Build Version
Package Version
The package trin4ik/laravel-middleware-setlocale contains the following files
Loading the files please wait ....