问题
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