Johan Compagner wrote:
So when you do this:mount(new WhateverUrlCodingStrategy("/mypage", MyPage.class, Locale.NL)); then when i hit /mypage we have to set the sessions locale to NL then?
I don't think so. The *resource* has the specified locale, i.e., the Page, but I think it's bad to have as side effect that the session's locale is suddenly changed.
I realize this introduces other issues... what happens with a Link to another page class? It should use the Page locale, not the session locale... So a component uses its locale, or its parent locale, or its parent's parent, etc, and if Page doesn't have a locale, THEN the session locale...
But I don't know the inner workings of Wicket's localization, nor have I thought long and hard about this yet, so I don't know if any of this make sense...
I just think it's weird that I cannot mount 2 locales of a page on two different paths... leading to the crawler and reference issues I mentioned before... What the best solution is, is probably something that needs to be discussed further. :-)
Regards, Sebastiaan Regards, Sebastiaan
johan On Mon, Apr 14, 2008 at 12:40 PM, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:Hi, I have localized my Wicket site, but I have a problem with localization + (mounted) bookmarkable pages. When mounting a bookmarkable page: mount(new WhateverUrlCodingStrategy("/mypage", MyPage.class)); there is no locale parameter... This means: 1) I cannot give my stateless pages of different locales different URLs, which means that nobody can link directly to a non-default locale version of the page. 2) My stateless pages are impossible to index in different locales. Google either finds only the default locale pages, or must follow a stateful "change locale" link, which will cause it to index pages which will be expired by the time they're in Google's search results. I know that I can make my own workaround, i.e., write my own url coding strategy with the locale in the root, /en/mypage to the english version, /mypage to the default locale, etc.. Or I could use IndexedParameterCodingStrategy to make the first parameter the locale (although this does not work if I want to use another coding strategy). However they're still workarounds for something that I think is conceptually not quite right in Wicket currently: the fact that it should be possible to mount different locales of a page on different urls, for *whatever* coding strategy I choose to use. Any ideas on this? Anybody already implemented the coding strategy for the locale in the root? Anybody got another easier workaround? Regards, Sebastiaan
smime.p7s
Description: S/MIME Cryptographic Signature
