make youre bookmarkable url with the locale param yourself:

new BookmarkablePageLink("id", MyPage.class, new PageParameters().put("locale",locale.toString()));

And then in youre constructor of the page set the locale you are given.

johan


On 3/12/06, nato <[EMAIL PROTECTED]> wrote:
[Warning: my English sucks!]

Hi. I have been evaluating Wicket for 4 days now. I would like to
request a feature for i18n that I wish other MVC framework had.

Based on what I've learned on Wicket's wiki, the Wicket pages' default
locale depends on the header property sent by the browsers (correct me
if I'm wrong). And I can set the pages to use a different locale other
than the default. But my problem is this: after I set the session to
use another locale (japanese for example), of course, the page's
content also change to japanese but the URL do not change. The problem
is, the japanese page is no longer bookmarkable.

A scenario in real-life is this: A user visited my site, selected the japanese
locale and found some content in there interesting, he would probably
copy the page's URL
    http://mysite/myapp/app?bookmarkablePage=Page2
and send it to a friend saying,
"Hey buddy! go to this URL and read the article. Don't worry, you will surely
understand the text because it's in Japanese language."
Then, his friend will reply saying,
"Are you crazy? The URL you've given me is not in Japanese, it's in English."

Of course, it's because his friend got the default locale which is
English. So I suggest that aside from Wickets getting the browsers
locale as the default for the session, let the session also be set by
default according to a URL in the page (but not the
parameterized-bookmarkable-page way because I'm talking about the
session's default locale).


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to