开发者

Spring 3 Validation and internationalization

I use this link to config my project's validation: Spring 3 Validation

And I added the following dependency:

     <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>4.1.0.Final</version>
    </dependency>

It works fine,but I have a internationalization issue,I am using Chinese, but I found there is no zh_CN exists in hibernate-validator-4.1.0.Final.jar. Is there an开发者_如何学Goother option? Thanks.


Have you tried the latest beta release?

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-validator</artifactId>
    <version>4.2.0.Beta1</version>
</dependency>

This link says that the Chinese translation work that has only just been finished in this version. There is a ValidationMessages_zh_CN.properties file inside the .jar so hopefully it contains what you need.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜