benconstable / laravel-localize-middleware Goto Github PK
View Code? Open in Web Editor NEWConfigurable localization middleware for your Laravel >=5.1 application
License: MIT License
Configurable localization middleware for your Laravel >=5.1 application
License: MIT License
Is it possible to update composer to include Laravel 6.0?
It would be nice if we could set a precedence in determiners. Eg. first check for a cookie and if not exists then check for a parameter, then for a session key and finally for a header attribute.
In addition to the other methods would be cool to have another way to set the locale.
Via Accept-Language
header maybe?
Hi, to the Author & all Users,
I've tried it and it doesn't work, and the "dynamic prefix" {$locale} seems to be not ever captured.
BenConstable\Localize\Determiners\Parameter
public function determineLocale(Request $request)
{
return $request->input($this->requestParam, $this->fallback);
}
This package has its strength over Waavi/Translate, it's more organized, has "stacked" drivers, and it doesn't have the "string/model translation" that I don't need for now. But its weakness is that all the "default locale redirection" & "route integrity checks" are being left out, making it way less robust in handling most common routing cases.
I'll planning to either fork it or issue PR to enhance it. If the Author is still active here maybe we can chat. I don't have much free time to spare besides work, but just happen that I need it so why not share it too? (only if I'm confident that my stuff works in the end though...)
Thanks.
The header determiner partially supports Accept-Language, but does not fully support RFC2616 14.4 (i.e language ranges and prefixes).
It'd be great to have a standalone determiner for Accept-Language that fully supports the RFC.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.