Yes, I'm doing this too. In fact, it is the same application packaged with WW1 (Webstore - i18n). The problem has to do with storing a Locale in the Session. The getText() method that gets called from LocaleSupport eventually needs a Locale object, and getting the right one is what I'm having trouble with. Anyway, the code is here http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-355 if anyone wants to look at it.
-RD -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Francisco Hernandez Sent: Thursday, October 23, 2003 10:20 PM To: [EMAIL PROTECTED] Subject: Re: [OS-webwork] i18n & Velocity I have a MyAction.properties (for the MyAction class, needs to be in the same package) file that i put all my messages in and just put the messages in there, for example resource.name=This is a message from the MyAction.properties file Robert Douglass wrote: > 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