Overriding the engine's setupForRequest does it for me:
class YourEngine extends BaseEngine {
protected void setupForRequest( RequestContext context ) {
super.setupForRequest( context );
String lang = context.getParameter("lang");
if (lang!=null)
setLocale( new Locale(lang, "CH"));
// ....
That's Tap3, in Tap4 you'll probably have to hook into some
RequestServicer-Pipeline instead ...
> -----Original Message-----
> From: Bondarenko, Oleg [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 31, 2006 11:43 AM
> To: Tapestry users
> Subject: Locale switching question
>
>
> Hello folks, please share your experience.
>
> What is he best way to implement locale switching in Tapestry
> applications?
>
> Say, your application supports English and German and there
> is a link to
> switch from one language to another.
>
> The problem is: if you just change the engine's locale in the link
> listener and return the same page - that page will still be in the old
> (now wrong) locale! Seems to be an old Tapestry issue, the solution
> would be to display another page. But that is VERY nasty,
> suppose I want
> to be able to change language on every page - do I have to double the
> number of pages in my application???
>
> There must be some clean way (or smart trick), right?
>
> TIA
> Oleg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]