I'm currently using JMSI18nRoutingBundle
in my Symfony2 project, and it's working fine so far, but I also need the ability to translate the routes itself, for example:
Routes in English
/en/my-route/whatever/XXX
Routes in Spanish
/es/mi-ruta/lo-que-sea/XXX
Summing up, I need the ability to define the following in my controllers:
/**
* @Route("route.my_route/route.whatever/XXX")
*/
Where route.my_route
are messages from the translations files:
messages.en.yml
route:
my_route: my-route
messages.es.yml
route:
my_route: mi-ruta
Does anyone knows if this is possible with this bundle at all? If not, is there any other way to achieve the desired effect?