I use the Symfony2 JMSI18nRoutingBundle to allow the automatic internationalization of my routes. Individual route internationalization can be disabled in routing.yml as follows
index: pattern: / defaults: { _controller: AcmeBaseBundle:Welcome:indexRedirector } options: i18n: false
However, I usually comment on routes in controllers and only define a prefix in routing.yml:
AcmeApiBundle: resource: "@AcmeApiBundle/Controller/" type: annotation prefix: /api options: i18n: false
In this case, disabling internationalization does not work properly, and routes are only agreed upon by adding the locale as a prefix for the URLs.
How to disable internationalization for all urls in a batch?
source share