开发者

Spring 3 Validation and internationalization

开发者 https://www.devze.com 2023-02-15 06:00 出处:网络
I use this link to config my project\'s validation: Spring 3 Validation And I added the following dependency:

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

精彩评论

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