Reputation: 63
is possible create symfony route with one name (e.g. "contact") and more paths based on host? And this route sets _locale
by host too.
I need it for simple usage {{ path('contact') }}
in template.
Example:
contact:
host: example.com
path: /contact
defaults: { _controller: AppBundle:Contact:index, _locale: en }
host: example.cz
path: /kontakt
defaults: { _controller: AppBundle:Contact:index, _locale: cs }
Thanks.
Upvotes: 2
Views: 84