Closed S3lfC0d3r closed 4 years ago
something like this https://docs.zendframework.com/zend-expressive/v3/cookbook/setting-locale-without-routing-parameter/ I'm trying to figure this out myself
Will take a look at this for next release in early January
I was looking at a possible implementation of this in the next major version but it really doesn't make sense being in the router itself.
You can register multiple routes to respond with the same controller and handle localisation there or in a middleware easily enough.
Now the router is a request handler in the latest release it's easy to have middleware strip out the language part of the url before the router even gets it's hands on it, so your routes won't need to declare any language segment :-D instead you can set the language as a request attribute in the middleware and pass it on. of course this means using another pipeline and setting the router as the request handler. Maybe a cool future feature could be adding middleware that occurs before the router tries to match :-D
I have Multi language CMS For Front and Admin Page. my default language is
en
so i don't need to add default language parameter into url.For English language(default without en):
For France Language(with fr):
How do check/route url parameters without default language?!