Zend Framework: Complex routes for multiple languages
I have different urls for different languages, they all lead to the sam开发者_StackOverflow社区e controller and action.
I have created implemented custom route with db checking, everything works fine, but the problem now is in assembling urls.
Currently i have two languages and i'm just using statement to figure out which url is required at the moment depending on currently selected language.
For example if language en, then use /en/library or if ru, then /ru/biblioteka and so on for the rest languages.
Can onyone suggest some solution for such complex routing?
Thanks ;)
Update
I was thinking about custom route. Picking data from db and pass it as parameter for future assembling, then use switch statement depending on current language inside assembling method of routes interface?
What do you think ppl? :)
ZF supports Translated segments in routes. I think this might be useful to you.
精彩评论