Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-15 Thread Erik van Oosten
Haha, brilliant. Sometimes you forget the simple stuff :) Thanks Sebastiaan, Erik. Sebastiaan van Erk wrote: Shouldn't it work if you just override getLocale() on your admin base page to return your admin locale? Regards, Sebastiaan

Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk
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

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Gwyn Evans
On Mon, Apr 14, 2008 at 11:40 AM, Sebastiaan van Erk [EMAIL PROTECTED] wrote: 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

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk
Gwyn Evans wrote: On Mon, Apr 14, 2008 at 11:40 AM, Sebastiaan van Erk [EMAIL PROTECTED] wrote: 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

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Johan Compagner
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? johan On Mon, Apr 14, 2008 at 12:40 PM, Sebastiaan van Erk [EMAIL PROTECTED] wrote: Hi, I have localized my Wicket site,

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Jan Kriesten
hi sebastiaan, Any ideas on this? Anybody already implemented the coding strategy for the locale in the root? Anybody got another easier workaround? i don't use a coding strategy for this but an extension to wicket filter that parses the 'relative path' of the url for locale definitions,

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Jan Kriesten
hi sebastiaan, Would you be willing to share that code? Because in the short term I think it's the best solution. it's all Scala - if you want that... ;-) best regards, --- jan. - To unsubscribe, e-mail: [EMAIL

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk
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

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Jan Kriesten
hi sebastiaan, i just snip the things out and comment (as far as necessary): use this filter instead of the default wicket filter: ---8--- object LocaleFilter { final val REQUEST_LOCALE_ATTRIBUTE = _request_locale_ } class LocaleFilter extends WicketFilter { import

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk
Hi Jan, Would you be willing to share that code? Because in the short term I think it's the best solution. Regards, Sebastiaan Jan Kriesten wrote: hi sebastiaan, Any ideas on this? Anybody already implemented the coding strategy for the locale in the root? Anybody got another easier

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk
Hmm.. Scala :-) I guess I'll opt for English then :-) I don't quite understand what you do... taking it out of the filter is easy enough I guess, but then? When you set a property on the application how does this work with different threads? Do you use thread local? Then you do you render

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Jan Kriesten
hi sebastiaan, Btw: do you have a change locale link? How do you make sure it plays nice with bookmarkable urls? actually, since the locale is filtered out from the actual url - you don't have to worry about this at all. just link the user to the /de/xy or /en/xy-pages and you get called

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Johan Compagner
The problem is that a component has not a locale by default So then we should give a Page a locale field. and then that will be set.. But the problem is if you do setResponsePage(Page.class) what should then be taken? The session locale mount? johan On Mon, Apr 14, 2008 at 6:14 PM,

Re: Localization, Bookmarkable pages, and mounting strategies

2008-04-14 Thread Sebastiaan van Erk
Johan Compagner wrote: The problem is that a component has not a locale by default So then we should give a Page a locale field. and then that will be set.. But the problem is if you do setResponsePage(Page.class) what should then be taken? The session locale mount? The most logical thing