Reputation: 9645
I have different urls for different languages, they all lead to the same 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? :)
Upvotes: 1
Views: 654
Reputation: 238957
ZF supports Translated segments in routes. I think this might be useful to you.
Upvotes: 3