MessageInterpolator - ResourceBundleLocator
5.3.1. ResourceBundleLocator A common use case is the ability to specify your own resource bundles for message interpolation. The default MessageInterpolator implementation in Hibernate Validator is called ResourceBundleMessageInterpolator and per default loads resource bundles via ResourceBundle.getBundle. However, ResourceBundleMessageInterpolator also allows you to specify a custom implementation of ResourceBundleLocator allowing you to provide your own resource bundles. Example 5.7, “Providing a custom ResourceBundleLocator” shows an example. In the example HibernateValidatorConfiguration.getDefaultResourceBundleLocator is used to retrieve the default ResourceBundleLocator which then can be passed to the custom implementation in order implement delegation. Example 5.7. Providing a custom ResourceBundleLocator HibernateValidatorConfiguration configure = Validation.byProvider(HibernateValidator.class).configure(); ResourceBundleLocator defaultResourceBundleLocator = configure.getDefaultResourceBundleLocator(); ResourceBundleLocator myResourceBundleLocator = new MyCustomResourceBundleLocator(defaultResourceBundleLocator); configure.messageInterpolator(new ResourceBundleMessageInterpolator(myResourceBundleLocator)); Hibernate Validator provides the following implementation of ResourceBundleLocator - PlatformResourceBundleLocator (the default) and AggregateResourceBundleLocator. The latter can be used to specify a list of resource bundle names which will get loaded and merged into a single resource bundle. Refer to the JavaDoc documentation for more information.