Examples of cross-locale processing
- Last Updated: July 16, 2025
- 2 minute read
- Corticon
- Version 6.3
- Documentation
If you have Decision Service that is called from English and German locales you would want to define translations for your rule statements as shown here:
The internationalization feature uses the English rule statements in replies to requests. When the Server is set to German, it uses the German rule statements in replies to requests.
When a request does not indicate its language and locale, and the request has decimal values or literal dates that are not consistent with the server's format, the request message throws an exception.
When a request includes the execution property PROPERTY_EXECUTION_LOCALE and a valid value, the provided locale is used
to parse data values in the request document and to produce the response document. In
the response document, the provided locale is used to format data values and to select
the localized rule messages to return. Data types with locale dependencies are decimal
and literal dates. If an invalid locale is provided, an exception is thrown. If
localized rule messages were not defined, the default rule messages are used.
Using the example of the English-German rulesheet and if the Decision
Service is running on a en-US system, consider the
following messages:
The following request specifies German, de-DE, as its locale:
<CorticonRequest xmlns="urn:Corticon" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" decisionServiceName="Order_localeAware">
<ExecutionProperties>
<ExecutionProperty name="PROPERTY_EXECUTION_LOCALE" value="de-DE" />
</ExecutionProperties>
<WorkDocuments>
<Order id="Order_id_1">
<dueDate>08/25/14</dueDate>
<total xsi:nil="1" />
<myItems id="Item_id_1">
<price>10,250000</price>
<product>Ball</product>
<quantity>20</quantity>
</myItems>
</Order>
...
</WorkDocuments>
</CorticonRequest>
The response specifies German, de-DE, as
its locale. The messages are in German and the decimal values are delimited correctly:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:CorticonResponse xmlns:ns1="urn:Corticon"
xmlns="urn:Corticon" decisionServiceName="Order_localeAware">
<ns1:ExecutionProperties>
<ns1:ExecutionProperty name="PROPERTY_EXECUTION_LOCALE"
value="de-DE" />
</ns1:ExecutionProperties>
<ns1:WorkDocuments>
<ns1:Order id="Order_id_1">
<ns1:dueDate>2014-09-25</ns1:dueDate>
<ns1:shipped>true</ns1:shipped>
<ns1:shippedOn>2014-04-30T23:00:00.000-05:00</ns1:shippedOn>
<ns1:total>205,000000</ns1:total>
<ns1:myItems id="Item_id_1">
<ns1:price>10,250000</ns1:price>
<ns1:product>Ball</ns1:product>
<ns1:quantity>20</ns1:quantity>
<ns1:subtotal>205,000000</ns1:subtotal>
</ns1:myItems>
</ns1:Order>
...
</ns1:WorkDocuments>
<ns1:Messages version="1.10">
<ns1:Message>
<ns1:severity>Info</ns1:severity>
<ns1:text>die Zwischensumme der Posten für Pencil ist 5,000000.</ns1:text>
<ns1:entityReference href="#Item_id_4" />
</ns1:Message>
<ns1:Message>
<ns1:severity>Info</ns1:severity>
<ns1:text>die Zwischensumme der Posten für Ball ist 205,000000.</ns1:text>
<ns1:entityReference href="#Item_id_1" />
</ns1:Message>
...
<ns1:Message>
<ns1:severity>Info</ns1:severity>
<ns1:text>die Gesamt Paket versenden 05/01/14 12:00:00 AM</ns1:text>
<ns1:entityReference href="#Order_id_1" />
</ns1:Message>
</ns1:Messages>
</ns1:CorticonResponse>
</soapenv:Body>
</soapenv:Envelope>
This request specifies French, fr-FR, as
its locale:
<ns1:CorticonResponse xmlns:ns1="urn:Corticon" xmlns="urn:Corticon" decisionServiceName="Order_localeAware">
<ns1:ExecutionProperties>
<ns1:ExecutionProperty name="PROPERTY_EXECUTION_LOCALE"
value="fr-FR" />
</ns1:ExecutionProperties>
...
The response specifies French as its locale but, while the messages default to English, the decimal values are processed and then delimited correctly:
<ns1:Messages version="1.10">
<ns1:Message>
<ns1:severity>Info</ns1:severity>
<ns1:text>The subtotal of line item for Ball is 205,000000.</ns1:text>
<ns1:entityReference href="#Item_id_1" />
</ns1:Message>
<ns1:Message>
<ns1:severity>Info</ns1:severity>
<ns1:text>The subtotal of line item for Pencil is 5,000000.</ns1:text>
<ns1:entityReference href="#Item_id_4" />
</ns1:Message>
...