Locale handling while creating the routes #200
Description
Currently, the PhpcrOdmAdapter does not take care of the content document locale when creating the routes for translatable documents.
The _locale
default is not added to the route defaults. So, when the route content document is mapped to the contentDocument
request attribute, the request locale remains to the default locale.
I know this can be resolved by using the Lunetics Locale bundle but it rely on the URL, which isn't what I'm looking for.
The '_locale' requirement is not added to the route requirement. So, when an URL is generated from a content document (using the ContentAwareGenerator), the first route always matches regardless the locale of the content.
I resolved those issues using a custom Adapter which simply add the missing default and requirement when creating a route.
But are those behaviors intended ?