There is more and more emphasis on pretty URLs these days. With things like Ruby on Rails around to easily support it and better knowledge and use of things like mod_rewrite the days of horrible query strings is going away (excluding of course the most used websites – search engines). But how do you make your multilingual website have pretty URLs?
For example, starting a new Finnish lesson uses the following:
That would be the
new action of the
lesson controller with an extra language code parameter of
In German this should be something like:
By default this would access the
neu action of the
The “simple” solution would be to write lots of controllers that just delegate to the real one. Which is silly. Instead an extra layer has to be added to the routing process some sort of look-up table mapping localized URL fragments with “real” canonical ones. This should be fairly simple with Zend Framework (although I haven’t actually tried yet).
Just an important issue no-one seems to have brought up yet…
pretty URLs, Zend, Zend Framework, web frameworks, MVC