0
我想學習如何使用Struts 2,並在我找到的教程之後創建了一個簡單的應用程序。如何翻譯Struts 2的驗證消息?
我創建了一個<MyActionClass>-validation.xml
文件,我想知道如何將驗證消息轉換爲多種語言?
<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>
我可以從本地化的.properties文件中獲取消息,還是必須使用其他類型的驗證?