The problem
Path processors rely on the the language providing the language for the path that they are processing. See AliasManager. When matching a route for a request the path processors are ran, but if they are run after the master request they will always get the language for the master request.
Proposed solution
In the language manager store negotiated languages per request. This would mean that there needs to be a way to generate a key for a request (path + query ?). Also there needs to be a way to override the request stored in the language manager. By default it should be the current request from the request stack.
The LanguageManagerInterface should provide a method for setOverrideRequest(), removeOverrideRequest().
There should also be a method to generate key from request and a method for getting the request for which the language manager should negotiate language.
The impact of this change would be none.
Comments
Comment #2
_Archy_ commentedComment #5
_Archy_ commented