JMSI18nRoutingBundle
JMSI18nRoutingBundle copied to clipboard
How to translate Requirements ?
Hi,
Example:
@Route("/{channel}/", requirements={"channel"="channel_fr_1|channel_fr_2|channel_fr_3"}, name="channel_home")
I'd like to set:
- en: requirements={"channel"="channel_en_1|channel_en_2|channel_en_3"}
- de: requirements={"channel"="channel_de_1|channel_de_2|channel_de_3"}
Maybe we can add in route.en.xml :
I'd not enumerate the available channels in the requirements. You probably have them stored in the database anyway, no?
Personally: After this route, I have an other one for generic case: @Route("/{q}/", name="query") I think it is better to have 2 routes ... so presently I have for the channel_home route : requirements={"channel"="channel_en_1|channel_en_2|channel_en_3|channel_de_1|channel_de_2|channel_de_3|channel_fr_1|channel_fr_2|channel_fr_3"} but it is not the best ... Enumeration is speeder ...
For everybody: I think some requirements should be translatable ...
I am having this extract issue right now in current project :-/