I'll take a look at this... Part of the problem is that we don't want to be calling ActionContext.getContext() from JSP tags (since it may not have come through the ServletDispatcher)... I'll see what I can figure out.
> -----Original Message----- > From: Daniel Pfeifer [mailto:[EMAIL PROTECTED] > Sent: Friday, October 24, 2003 3:33 AM > To: '[EMAIL PROTECTED]' > Subject: RE: [OS-webwork] i18n & Velocity > > > I have a related problem. I am overriden the ActionSupport's > getLocale() but it never gets called. Any ideas? > > /Daniel > > -----Original Message----- > From: Robert Douglass [mailto:[EMAIL PROTECTED] > Sent: den 23 oktober 2003 16:43 > To: WebWork list > Subject: [OS-webwork] i18n & Velocity > > > Hi all. I've been having a problem with resource bundles. My > action extends ActionSupport, and in my velocity templates > I've been making calls to $action.getText(), which is my > first question: is that the best way to call getText()? I > read something in the archives about using > $text('resource.name'), but that hasn't worked for me. I'm > storing the locale in the session, and I overrode > ActionSupport.getLocale() to get the session value. The > LocalizedTextUtil.findText method makes a call to > ActionContext.getContext().getLocale(), which was always > returning US-en, even though I've got a German system, so I > know my getLocale() method wasn't being called. To solve this > all, I overrode the getText method altogether with public > String getText(String aTextName) { > return LocalizedTextUtil.findText(this.getClass(), > aTextName, getLocale()); } which works, but smells. Any > suggestion on how to do this cleaner, without having to > overwrite getText? > > -Robert > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation > Program. Do you like what SourceForge.net is doing for the > Open Source Community? Make a contribution, and help us add > new features and functionality. Click here: > http://sourceforge.net/donate/ > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > ------------------------------------------------------- > This SF.net email is sponsored by: The SF.net Donation > Program. Do you like what SourceForge.net is doing for the > Open Source Community? Make a contribution, and help us add > new features and functionality. Click here: > http://sourceforge.net/donate/ > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- This SF.net email is sponsored by: The SF.net Donation Program. Do you like what SourceForge.net is doing for the Open Source Community? Make a contribution, and help us add new features and functionality. Click here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork