I have already xml messages which used for localization.
<messages>
<message key="greeting">Hello!</entry>
<message key="farewell">Goodbye!</entry>
</messages>
I wanted to reuse this xml messages for struts2 application. Please provide how it can be customized to read xml files instead properties files
It can be customized if you define a custom
TextProviderand configure it to use with the project.You can read struts2 localization guide for example of implementation of
And here is the sample implementation for
XMLResourceBundle.In the
TextProviderimplementation you can useThe
messages.xmlhas the following format