how to change locale

2002-09-17 Thread Dom

Hi

Using Struts 1.0.2, I need to be able to change the form messages locale

I tried to reload the action and use :

locale = new Locale(language, country);
setLocale(request, locale);
messages = getResources();

but the locale doesn't change.

If I insert after setLocale()

((ActionServlet) servlet).initApplication();

the locale change and everything is ok.

This seems a rather hard solution. Ain't there a more elegant one ?

Dom



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: how to change locale

2002-09-17 Thread Gideon, Thomas

We use something like

request.getSession().setAttribute(Action.LOCALE_KEY, locale);

within the logon action of our application, and that seems to work.

Thomas Gideon
Sr. Software Developer
B2eMarkets

301.230.2236  Tel.
301.230.2248  Fax.
[EMAIL PROTECTED]
www.B2eMarkets.com


 -Original Message-
 From: Dom [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 17, 2002 4:43 PM
 To: [EMAIL PROTECTED]
 Subject: how to change locale
 
 
 Hi
 
 Using Struts 1.0.2, I need to be able to change the form 
 messages locale

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: how to change locale

2002-09-17 Thread David Graham

That's how I do it as well.  If you want to let the user change the locale 
themselves with a select box you might check out the custom tag I posted to 
bugzilla:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12648

Shameless self promotion, I know, but I do think it's useful.

Dave


From: Gideon, Thomas [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: how to change locale
Date: Tue, 17 Sep 2002 16:38:30 -0400

We use something like

request.getSession().setAttribute(Action.LOCALE_KEY, locale);

within the logon action of our application, and that seems to work.

Thomas Gideon
Sr. Software Developer
B2eMarkets

301.230.2236  Tel.
301.230.2248  Fax.
[EMAIL PROTECTED]
www.B2eMarkets.com


  -Original Message-
  From: Dom [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 17, 2002 4:43 PM
  To: [EMAIL PROTECTED]
  Subject: how to change locale
 
 
  Hi
 
  Using Struts 1.0.2, I need to be able to change the form
  messages locale

--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: how to change locale

2002-09-17 Thread Gideon, Thomas

As a side note to those interested, who may not already know (those already
using JSTL please ignore  d^:); the JSTL formatting taglib already exposes
the ability to dynamically change your locale on the fly.

 -Original Message-
 From: David Graham [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 17, 2002 5:53 PM
 To: [EMAIL PROTECTED]
 Subject: RE: how to change locale
 
 
 That's how I do it as well.  If you want to let the user 
 change the locale 
 themselves with a select box you might check out the custom 
 tag I posted to 
 bugzilla:
 
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12648
 
 Shameless self promotion, I know, but I do think it's useful.
 
 Dave
 
 
 From: Gideon, Thomas [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List 
 [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Subject: RE: how to change locale
 Date: Tue, 17 Sep 2002 16:38:30 -0400
 
 We use something like
 
 request.getSession().setAttribute(Action.LOCALE_KEY, locale);
 
 within the logon action of our application, and that seems to work.
 
 Thomas Gideon
 Sr. Software Developer
 B2eMarkets
 
 301.230.2236  Tel.
 301.230.2248  Fax.
 [EMAIL PROTECTED]
 www.B2eMarkets.com
 
 
   -Original Message-
   From: Dom [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, September 17, 2002 4:43 PM
   To: [EMAIL PROTECTED]
   Subject: how to change locale
  
  
   Hi
  
   Using Struts 1.0.2, I need to be able to change the form
   messages locale
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 
 _
 Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: how to change locale

2002-09-17 Thread David Graham

Thanks.


From: Gideon, Thomas [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: how to change locale
Date: Tue, 17 Sep 2002 17:58:44 -0400

As a side note to those interested, who may not already know (those already
using JSTL please ignore  d^:); the JSTL formatting taglib already exposes
the ability to dynamically change your locale on the fly.

  -Original Message-
  From: David Graham [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, September 17, 2002 5:53 PM
  To: [EMAIL PROTECTED]
  Subject: RE: how to change locale
 
 
  That's how I do it as well.  If you want to let the user
  change the locale
  themselves with a select box you might check out the custom
  tag I posted to
  bugzilla:
 
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12648
 
  Shameless self promotion, I know, but I do think it's useful.
 
  Dave
 
 
  From: Gideon, Thomas [EMAIL PROTECTED]
  Reply-To: Struts Users Mailing List
  [EMAIL PROTECTED]
  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  Subject: RE: how to change locale
  Date: Tue, 17 Sep 2002 16:38:30 -0400
  
  We use something like
  
  request.getSession().setAttribute(Action.LOCALE_KEY, locale);
  
  within the logon action of our application, and that seems to work.
  
  Thomas Gideon
  Sr. Software Developer
  B2eMarkets
  
  301.230.2236  Tel.
  301.230.2248  Fax.
  [EMAIL PROTECTED]
  www.B2eMarkets.com
  
  
-Original Message-
From: Dom [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 4:43 PM
To: [EMAIL PROTECTED]
Subject: how to change locale
   
   
Hi
   
Using Struts 1.0.2, I need to be able to change the form
messages locale
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 
 
  _
  Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]