struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@gmail.com>
Subject Re: Customizing message translation
Date Wed, 14 Jun 2006 17:33:58 GMT
Struts uses MessagesResources to perform the key-->text translation.
The default implementation used is PropertyMessageResources (both in
the org.apache.struts.util package).

If you want to use your own MessageResources implementation then you
need to create two classes - the custom implementation and a factory
(MessageResourceFactory implementation) which creates an instance of
that implementation.

Then you configure struts with the name of the factory:

http://struts.apache.org/struts-action/userGuide/configuration.html#resources_config

Niall

On 6/14/06, Scott Van Wart <scott@indosoft.ca> wrote:
> I'd like to expand the message translation with a few things.  I was
> wondering where I should look for plugging in my own processing of
> keys->message text.
>
> Thanks,
>  Scott

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


Mime
View raw message