Hibernate Team |
 |
Joined: Thu Apr 05, 2007 5:52 am Posts: 1689 Location: Sweden
|
Built-in support for a specific Locale is in the message interpolation. Other than that there is nothing out of the box. I also believe different validation.xml files per Locale would be not such a good idea.
If you want to go down this route, you could create multiple Validator instances - one per Locale. You can then choose the right validator for a specific Locale. This requires though that you are configuring the constraints via xml. Using the bootstrap configuration object you can pass arbitrary xml mapping files to the boostrapping process.
The Hibernate Validator 4.1 release will also contain a programmatic constraint configuration API (not part of the Bean Validation spec!) which will allow you to configure and create different Validator instances.
--Hardy
|
|