I am porting a PHP application from a 'own' 'framework' to Zend Framework (1.11.11) together with Doctrine2. This all wents well except that the application is available in two languages, Dutch and German. I am looking for a way to make two URL's accesable:
I tried this with the Regex route but it isn't nice since now the 'page' parameter must always being given when assembling:
resources.router.routes.viewreviews.type = "Zend_Controller_Router_Route_Regex"
resources.router.routes.viewreviews.route = "(klantbeoordelingen|kundenbewertung)[/]?([0-9]*)"
resources.router.routes.viewreviews.reverse = "%s/%d"
resources.router.routes.viewreviews.defaults.module = "default"
resources.router.routes.viewreviews.defaults.controller = "review"
resources.router.routes.viewreviews.defaults.action = "index"
resources.router.routes.viewreviews.map.name = 1
resources.router.routes.viewreviews.map.page = 2
The point is that it needs to be possible I should onmit the page param which now is impossible. I could make two regex routes though but that wouldn't be a nice approach. Cause I would get A LOT of routes which all of them almost look the same.
I think I am not looking for chained routes since the language is not included in the URL. The language is defined by the domainname you are accesing (.nl or .de).
Are there any ideas? Tips?