struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Kelly" <ke...@ipe.fzk.de>
Subject Re: MessageResources problem ?
Date Fri, 28 Mar 2003 10:40:57 GMT
You should really have the bundles named like this.

myresource
myresource_de (Germany)
myresourse_ko (Korea)
etc

One of the struts book will have a good line on this, or the i18n page at
the main web site.

Cheers

Simon
----- Original Message -----
From: "Eric Chow" <echow@macaucabletv.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Friday, March 28, 2003 11:30 AM
Subject: MessageResources problem ?


Hello,

For use multiple message-resources,

I set the following in struts-config.xml

<message-resources parameter="eric.mymessage" null="false"/>
<message-resources key="country" parameter="eric.countrylist" null="false"/>


Right?  The "eric.mymessage" is use by default.


Anyway, If I want to retrieve the default(eric.mymessage) in some area, such
as ActionForm or Actions.

I will use the following statement to get the MessageResources that store in
the REQUEST.

============================================================================
=
MessageResources messages =
(MessageResources)request.getAttribute(Globals.MESSAGES_KEY);
============================================================================
=

But the above statement will only return the default message resources.

How can I get the MesageResource of the bundle "country" ?????



Best regards,
Eric





==========================
If you know what you are doing,
it is not called RESEARCH!
==========================


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message