Havent actually gotten round to doing that bit in my action yet, but I have
this code there already right at the top of my execute method - guess I must
have cut and pasted it in back when I was still half awake ;-)

Locale locale = getLocale(request);
MessageResources messages = getResources(request);

With this I think you can then use something along the lines of:

String key="world.hello";
String gday = messages.getMessage(locale,key);

to obtain your i18n'ed string based on the key.


-----Original Message-----
From: Yaman Kumar [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 20, 2001 21:38
To: [EMAIL PROTECTED]
Subject: Accessing ApplicationResources.properties file in action class


Hi,
I have a requirement of accessing properties(i18n) file in action class.
Can any one throw light on it?.

Many Thanks,
rayaku

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


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

Reply via email to