I am doing a web in开发者_如何转开发 Zend Framework. I wanna it for being multilanguage so in the structure controller/action I wanna add a uri parameter like this:
domain.com/en/controller/action
But obviusly Zend try to get controller with name en
. How can I modify the requestUri
before Zend set the controller name and the action name?
Thanks
You can create your own routes for this, begin with something like this in your application.ini:
resources.router.routes.default.route = ":language/:controller/:action"
resources.router.routes.default.defaults.controller = "index"
resources.router.routes.default.defaults.action = "index"
More information on the Zend website: The Standard Router
精彩评论