You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Per Lovdinger <pe...@yahoo.com> on 2005/03/02 22:53:38 UTC

Using multiple resource-bundles - extending message resources

Hi there,
I'm using struts 1.1.

Problem:
========
I would like load multiple resource-bundles. 
Examples would be:

adaResources.properties
adaResources_sv_SE.properties

bedaResources2.properties
bedaResources_sv_SE2.properties

I've tried to configure struts.config different ways
but it seems it's no support for it.
The only way I can get it to work the standard way is
to add a key for respective bundles. 
But I don't want to do that. 

I want the files to be handled as a aggregate file
with all properties for adaResources.properties and 
bedaResources.properties.

So that I can reference like
<bean:message key="customer"> 

I do not want to do this:
<bean:message bundle="appl" key="customer"> 


Approach:
========
I'm now trying this idea:

<message-resources 
factory="loader.JangPropertyMessageResourcesFactory"
parameter="ApplicationResources"
className="loader.JangPropertyMessageResourcesConfig"
>
<set-property property="resourceNames" value="xxx,yyy"
/>
</message-resources>

In my factory class I instansiates my own class
JangPropertyMessageResources that extends from 
PropertyMessageResources.
  
When starting up the web-application it's fine but I
can't find a way to get a handle to
JangPropertyMessageResourcesConfig  from
JangPropertyMessageResources. 
How can I do that ?


Is there a better way to do this ?


 thanks in advance

=====



	
		
__________________________________ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/

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