Hi All,

We've developed an app using ZF and have now decided that we'd like to localize the urls by prefixing them with the language, eg:

http://example.com/page/whatever
http://example.com/en/page/whatever
http://example.com/fr/page/whatever
etc.

If no language is present in the url we'll default to english (or some other configured language).

Internally the app is all localized properly and translates as necessary so I'm just trying to figure out the easiest way to add the URL feature but can't quite get it working. Is there a way I could use setBaseUrl() or something so that I don't have to alter all the existing routes? I've subclassed my routes and tried automatically prefixing /:language to them but then that breaks the no language case.

Any suggestions or is there an example somewhere of something similar?

- Jeffrey

Reply via email to