I found a way to do this:
Use "master" routing to import a routing configuration. Since my packages usually have too much information, I share controllers, resources and routes in different βmodulesβ. As a result of this approach, I discovered this:
Routing.yml wizard
ProjectBaseBundle_default: resource: "@ProjectBaseBundle/Resources/config/routing-default.yml" prefix: /{_locale}/project/ requirements: _locale: en|es|de|fr
Child routing-default.yml
ProjectBaseBundle_default_privacy: pattern: /privacy defaults: { _controller: ProjectBaseBundle:Default:privacy } ProjectBaseBundle_default_legal: pattern: /legal defaults: { _controller: ProjectBaseBundle:Default:legal } ProjectBaseBundle_default_usage: pattern: /usage defaults: { _controller: ProjectBaseBundle:Default:usage }
With this routing configuration, I minimize the places where you need to write down the language requirements.
unairoldan
source share