External Components and Translated Messages
External components can make use of the Rules Engine through the Remote Rules Service API or JDBC. These external components can generate information or error messages of their own. These messages are often hard coded in the external component. A consequence of this is that these messages are nearly always in English, and they do not follow the language setting of the Rules Engine. External components can now make use of the translation capabilities of the Rules Engine.
You must first specify the language that is to be used. Add the following resource specification to the USDI file:
The <language> parameter is one that you have specified in the System languages window of the Definer.
The Extra Parameters field of the Remote Rules Service API Configurator or JDBC Configurator cannot be used to specify this resource. You must add the resource specification to the USDI file manually.
The translated messages must have previously been defined in the System Local Messages window of the Definer.
External components can communicate with the Rules Engine through the Remote Rules Service API. The INVOKE mechanism is used for this communication. To call a translated system message, execute the following statement:
SELECT '<category>', '<name>', ['<par1>','<par2>',...]
The TranslateMessage method requires the following parameters:
Mandatory parameter. This is the category that the message belongs to, specified in the system messages window.
Mandatory parameter. This is the logical name of the message that has been specified in the system messages window.
Optional parameter(s). This is a string that substitutes a parameter in the message. The method call can have any number of parameters, thus has a variable number of input parameters.
To call a translated COMMIT message:
SELECT 'Frequent End User Msg', 'COMMIT', '15'
You should now see the message:
15 rij(en) opgeslagen