Zend Framework Multilingual route

一笑奈何 提交于 2019-12-11 19:18:21

问题


I have a site built on Zend Framework.

It is multilingual, using the sessions. I have icons of flags which when clicked call a controller which keeps the session language. This is probably not the most optimized, but that's the way it is.

I wish I could manage two different URLs:

example.net/module/controller/action

example.net/lang/module/controller/action

But I would like the parameter lang to be unused. This is just to have different URLs depending on the language, as if it were a sort of redirection.

Example:

stackoverflow.com/questions/ask = stackoverflow.com/en/questions/ask = stackoverflow.com/es/questions/ask

In fact, I just want to prefix my controller with a fake parameter which does nothing.

How can I do that?

来源:https://stackoverflow.com/questions/10336893/zend-framework-multilingual-route

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!