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: *language:<language> For example: *language:NL The <language> parameter is one that you have specified in the System languages window of the Definer. NOTE 1: 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. NOTE 2: 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: INVOKE RulesEngine.TranslateMessage WITH SELECT '<category>', '<name>', ['<par1>','<par2>',...] Parameters The TranslateMessage method requires the following parameters: category: Mandatory parameter. This is the category that the message belongs to, specified in the system messages window. name: Mandatory parameter. This is the logical name of the message that has been specified in the system messages window. par1 [,par2]: 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. Example To call a translated COMMIT message:
INVOKE RulesEngine.TranslateMessage WITH SELECT 'Frequent End User Msg', 'COMMIT', '15' You should now see the message: 15 rij(en) opgeslagen Related Topics |