You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ne...@srb-intl.com on 2003/04/04 16:58:58 UTC

RE: Different resource bundle.

I have extended MessageResources and MessageResourcesFactory with my own classes.
Works fine. Thing is that in our system user selected language object is contained
in session. 

So here comes question:

 HOW TO ACCESS SESSION OBJECT (or pageContext) IN INHERITED MessageResources class
 TO ENSURE RIGHT MESSAGE RETRIEVAL?

regards,
~nn


-----Original Message-----
From: James Mitchell [mailto:jmitchell@apache.org]
Sent: Thursday, April 03, 2003 2:25 PM
To: Struts Users Mailing List
Subject: Re: Different reource bundle.


On Thu, 2003-04-03 at 14:17, Nerijus.Navickas@srb-intl.com wrote:
> Hello there,
> 
> Project I am working on has resources organized in a different way than standard:
> Thing is that resources are kept in format:
>  
>   message1.en=Hello!
>   message1.fr=Bonjur!
> 
> And whole mechanism of resources retrieval widely implemented. 
> 
> So question is: 
> 
> IS THERE A WAY TO WARP/OVERRIDE/INHERIT OR OTHER WAY
> TO MAKE EXISTING RESOURCES MECHANISM PLUG UNDER STRUTS?

You could make it work if you implement your own MessageResources.  As
long as you stick to the MessageResources api, then it should work
fine.  I say this assuming that your 'struts app' will be referencing
them as 'message1' and not 'message1.en'.

> 
> thanks for reading,
> ~nn
> 
> 
>    
> 
-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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


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