You don't need anything in struts.xml - as I said in my other message you
are just calling the wrong getMessage() method.

Paul

> -----Original Message-----
> From: None None [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 13, 2004 6:33 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Language resource bundles problem
> 
> 
> That seems right to me... I added the <message-resource) tags 
> as you state 
> (I already had the config init param in web.xml), but it 
> still doesn't seem 
> to be working, looks like it's still getting null.
> 
> 
> >From: "Harjot Narula" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: Language resource bundles problem
> >Date: Thu, 13 May 2004 21:05:31 +0530
> >
> >Hi
> >
> >I think you need to mention something like this in web.xml
> >
> >   <init-param>
> >    <param-name>config</param-name>
> >    <param-value>/WEB-INF/struts-config.xml</param-value>
> >   </init-param>
> >
> >and in struts-config.xml  you need to have this
> >
> >   <message-resources parameter="ofmResources"/>
> >   <message-resources key="de" parameter="ofmResources_de"/>
> >
> >you can use this in JSP as
> >
> ><bean:message bundle="de" key="messages.deleteFailed" />
> >
> >This will also work probably
> >
> >myActionForm.setMessage(mr.getMessage("de", 
> "messages.deleteFailed"));
> >
> >Correct me if I am wrong
> >
> >Harjot
> >
> >
> >
> >
> >
> >----- Original Message -----
> >From: "None None" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Thursday, May 13, 2004 8:54 PM
> >Subject: Language resource bundles problem
> >
> >
> > > Hello all.  I posted this question a little while ago as 
> a reply to
> >another
> > > thread, but I figured the question might be lost there...
> > >
> > > I'm trying to get multiple language support to work.  I 
> have created two
> > > files, ofmResources.properties and 
> ofmResources_de.properties and stored
> > > them in WEB-INF/classes.
> > >
> > > In web.xml I have:
> > >
> > > ...
> > > <init-param>
> > >   <param-name>application</param-name>
> > >   <param-value>ofmResources</param-value>
> > > </init-param>
> > > ...
> > >
> > > ...as an init parameter of ActionServlet.  Then, in a 
> particular action 
> >I
> > > need to return a message to the view, so I do this:
> > >
> > > MessageResources mr = getResources(request);
> > > myActionForm.setMessage(mr.getMessage("messages.deleteFailed"));
> > >
> > > Now, this works just fine.  My message is displayed as a 
> result of the
> > > onLoad event of my page via a simple JavaScript alert 
> box.  Very cool.
> > >
> > > However, if I want to display the message from the German 
> resource file, 
> >I
> > > can't get it to work.  I thought all I had to do was this:
> > >
> > > myActionForm.setMessage(mr.getMessage("de", 
> "messages.deleteFailed"));
> > >
> > > ...but it always seems to return null.  I am expecting that the 
> >framework
> > > will, in simplest terms, just append _de to the 
> "ofmResources" value of
> >the
> > > application init param, and therefore get the 
> messages.deleteFailed 
> >value
> > > out of that file rather than the default 
> ofmResources.properties file.
> > >
> > > Am I nuts or should it not work that way?  If I'm nuts 
> (or nutier than
> > > normal :) ), then how does one get this to work?  If I'm 
> not nuts, any
> >ideas
> > > why what I'm doing doesn't work?  Thanks all!
> > >
> > > _________________________________________________________________
> > > Best Restaurant Giveaway Ever! Vote for your favorites 
> for a chance to 
> >win
> > > $1 million! http://local.msn.com/special/giveaway.asp
> > >
> > >
> > > 
> ---------------------------------------------------------------------
> > > 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]
> >
> 
> _________________________________________________________________
> Is your PC infected? Get a FREE online computer virus scan 
> from McAfeeŽ 
> Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**********************************************************************
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.
**********************************************************************


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

Reply via email to