| Author |
struts - internationalization in Action class
|
loguKK
Greenhorn
Joined: Jun 19, 2007
Posts: 2
|
|
hi all, i like to implement the struts internationalization message in my Action class ... i have done it in JSP pages... as i am using property file for all the languages .. how to implement in Action Classes..,
|
 |
Mahima Singh
Greenhorn
Joined: May 16, 2007
Posts: 26
|
|
It works in the same way, for eg, In MessageResource.properties : Customer.search= Customer Search Action class: String str = new String("Customer.search"); In Struts Config: <message-resources parameter="MessageResource"/> [ July 04, 2007: Message edited by: Mahima Singh ]
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
|
The Struts Action class (your actions' superclass) has a getResources() method that returns an instance of MessageResources. Once you have this object, you can use its getMessage() method to retrieve a specific message. For more information, see the Struts JavaDoc
|
Merrill
Consultant, Sima Solutions
|
 |
 |
|
|
subject: struts - internationalization in Action class
|
|
|