How to handle requests and replies across locales
- Last Updated: March 6, 2020
- 2 minute read
- Corticon
- Documentation
When a Corticon service
request document provides data formats that are unsupported by the Server, the request
throws an exception. The two most common issues are:
- Inconsistent parsing of the decimal delimiter - For example, a message is supplying a comma (such as "157,1") and the Server is expecting a period ("157.1")
- Inconsistent name of a literal month name - For example, a message is supplying a French name (such as "avril") and the Server is expecting an English name ("April")
<ExecutionProperties>>
<ExecutionProperty name="PROPERTY_EXECUTION_LOCALE" value="language-country" />
</ExecutionProperties>>
where language-country is a Java
standard identifier, such as en-US for English-United States.When the message's locale is specified, it is used at rule execution time regardless of the Server's default locale. If the Rulesheet has a matching locale, those rule statement messages are used. When rule processing is complete, the output response maps the results to the formats of the requestor's locale, and--when rule statement messages are available for the requestor's locale--messages for that locale are included.
Note: Matching a literal month name must have the appropriate case and
diacritical marks, such as août, décembre and März.
Note: When the
locale property is not set on
an inbound request, the Corticon Server assumes the
locale of the server machine, or the language that is set as an override in the Java
startup of the server. That setting will use locale settings in Corticon Rulesheets for rulestatement messages so that a server
running the Rulesheet's Decision Service would get rule statements that are specified for
that locale.