Save for a few exceptions, it is the responsibility of Web Determinations to handle the localization of error and warning messages. Only error and warning messages are localized (that is, all objects that implement either com.oracle.determinations.interview.engine.data.error.Error or com.oracle.determinations.interview.engine.data.error.Warning). Uncaught exceptions and other non-recoverable errors are handled differently.
In Web Determinations, localization is performed through the message service which is responsible for loading the correct message bundle for the specified locale and returning the message for the specific error or warning to be localized. The message bundle itself is a properties file called messages.<locale>.properties. The location of this file is specified by the 'messages.path' property in the application.properties file.
The message service also utilizes the Velocity Templating Engine to allow substitution of current property values in the error message. For example, if you wanted to display the attribute ID and the actual value that was entered in an invalid value error, you could do so by setting your error property as:
AttributeValueError = The value ${message.value} is not valid for attribute ${message.attributeId}
See also: