Jason Carreira wrote:
All of the getText() methods should use the locale provided by your
Action if it implements LocaleProvider (which has one method
getLocale())... The default implementation in ActionSupport calls
ActionContext.getContext().getLocale()... The Locale in the
ActionContext is set by the ServletDispatcher when it creates the
ActionContext to be the Locale returned from the HttpServletRequest,
which should be the Locale which the client requested in the Http
headers.
All of this is to say that if you want a different Locale to be used, override the getLocale() method in ActionSupport or directly implement the Interface yourself.
Jason
-----Original Message-----
From: Francisco Hernandez [mailto:[EMAIL PROTECTED] Sent: Friday, January 30, 2004 7:06 AM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] how to change locales at runtime?
right now im using resource bundles for all texts in my app, how can i change the locale of a running app?
right now ive got one main resource buncle im using, how can i at runtime change the resource bundle it uses?
i'd like to have a screen like viewQuiz.action?lang=spanish and have that use the spanish resource bundle.. it should default to english though.. how do i do this (with webwork2)
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________
Opensymphony-webwork mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork