How can I translate Struts 2 validation messages?
I want to learn how to use Struts 2 and I created a simple application following the tutorial I found.
I've created a file <MyActionClass>-validation.xml
and I'm wondering how can I translate the validation messages into multiple languages?
<field name="password">
<field-validator type="requiredstring">
<param name="trim">true</param>
<message>You have to enter a password.</message>
<!-- How can I localize this message? -->
</field-validator>
</field>
Can I get messages from the localized .properties file or do I need to use some other validation?
0
source to share