2012-01-27 89 views
2

Zend框架的定制路线,这是我目前的路线多语言

routes.index.route = "/:lang/:controller/:action*" 
routes.index.defaults.controller = index 
routes.index.defaults.action = index 
routes.index.defaults.lang = en 

但它不工作,我需要像/:lang/:controller/:action有人可以帮我吗?谢谢!

回答

0

你的语法看起来有点稀疏的尝试:

resources.router.routes.index.route = "/:lang/:controller/:action*" 
resources.router.routes.index.defaults.module = default 
resources.router.routes.index.defaults.controller = index 
resources.router.routes.index.defaults.action = index 
resources.router.routes.index.defaults.lang = en 

你还需要定义,即使它仅仅是“默认”(读无模块)模块,该模块。