Reputation: 5714
I'm new to symfony, but thinking about starting a project. I have one requirement, I need dynamic routes with multilingual support http://example.com/locale/category/category_1/category_2/.../category_N/item, As it can be guessed, each of those categories will have list of child categories. Also when switching language, it should automatically switch all categories, and item to that language So the routes would be very similar of those wordpress or joomla cms have. As far as I can tell I have few options: 1. Use locale setting and symfony default routing with "/" enabled, http://symfony.com/doc/current/cookbook/routing/slash_in_parameter.html 2. Use symfony cmf router, thought din't had enough time to fully grasp this concept though it looks more of a standard way.
My question would be, what's the best approach (not necessarily the simplest) and best practices to this solution?
Upvotes: 0
Views: 395
Reputation: 298
If I were you, I'd look into using a bundle that supports internationalization on routing.
The JMS Internationalization Bundle is an excellent choice for routing i18n.
https://packagist.org/packages/jms/i18n-routing-bundle
Definitely poke around the documentation and see if it's what you need in an i18n router.
Upvotes: 2