Hello,

I've been investigating Wicket for building an educational site, and there's
one issue that's been nagging me:

The majority of our URLs would need to be pretty, bookmarkable, and start
with a locale, like:
http://www.example.com/en/test/1
or
http://www.example.com/zh_CN/page-search/penguin
Where the "en" and "zh_CN" are the locales to be used, usually followed by
one or more slash-separated tokens that uniquely identify a page, followed
by zero or more slash-separated tokens that are parameters. Ideally, the
locale and parameters would be passed into a WebPage with the
PageParameters.

Is there an elegant way to accomplish this? I've resorted to having the
application mount a custom class implementing
IRequestTargetUrlCodingStrategy for each locale ("en", "zh_CN"), that adds
the locale to the page parameters, and then uses regular expressions to
identify the class of the Page. This seems like somewhat of a hack, where
encode(IRequestTarget) is left unimplemented and using links seems more
difficult.

-Jonathan Olson

Reply via email to