Provides support for localization in XWork.
Resource bundles are searched in the following order:
- ActionClass.properties
- Interface.properties (every interface and sub-interface)
- BaseClass.properties (all the way to Object.properties)
- ModelDriven's model (if implements ModelDriven), for the model object repeat from 1
- package.properties (of the directory where class is located and every parent directory all the way to the root directory)
- search up the i18n message key hierarchy itself
- global resource properties
To clarify #5, while traversing the package hierarchy, Struts 2 will look for a file package.properties:
com/
acme/
package.properties
actions/
package.properties
FooAction.java
FooAction.properties
If FooAction.properties does not exist, com/acme/action/package.properties will be searched for, if not found com/acme/package.properties, if not found com/package.properties, etc.
A global resource bundle could be specified programatically, as well as the locale.
@author Jason Carreira
@author Mark Woon
@author Rainer Hermanns
@author tm_jee
@version $Date$ $Id$