Create a new language translation for a rulebase

Create a new language translation for a rulebase

You can translate an existing rulebase into another language by adding translation documents to the rulebase. Translation documents are Excel files in which you specify your own translations of the relevant elements of the rulebase, in any language you choose. The translation document is created for you by Oracle Policy Modeling, including all rulebase elements which need a translation in order to be deployed (ie attributes, screens, rulebase messages, events, and general rulebase metadata). Note that any element can be flagged as not requiring translation.

Translation documents are useful when you do not have access to a parser for a language, and you do not wish to create one using the Oracle Policy Modeling Rapid Language Support (RLS) Tool. Because you only create translations for the specific phrases used in your rulebase, it can be quicker to deploy a rulebase using this method than by creating a new RLS parser.

Translation documents also allow you to deploy a single rulebase in multiple languages, while continuing to maintain your rulebase in its original language.

Note that creating and running a translation document allows you to provide a language translation of your rulebase only, it will not modify the formatting of data such as currency, date and number conventions etc. These formats are set based on the Region setting in Project Properties for your original rulebase.

What do you want to do?

Add a translation of an existing rulebase

Run a translation of a rulebase

Check for untranslated text in a rulebase

Update a translation file

Add a translation of an existing rulebase

You can easily add a rulebase translation to an existing rulebase project. It is advisable to add a translation of a rulebase only after the bulk of rulebase development is complete. This will minimize the amount of rework needed in the translation if the main rulebase changes after the translation is done.

  1. Right-click on the Translations folder in the Project Explorer of your rulebase project, and select Add New Translation Document.
  2. In the New Translation File dialog, select the appropriate Locale for your new rulebase translation, based on the relevant language and region, and click OK. Note that the rulebase cannot have a translation for the rule language of the rulebase, or two translations for the same locale setting - a build error will result if these files are included in the rulebase build.



  3. The new translation document is added to the Project Explorer. Enter an appropriate name for the translation document.
  4. Open the new translation document in Excel. Oracle Policy Modeling has automatically inserted all the elements of the rulebase which require a translation to your chosen language, which may include:
  5. Fill out the translation document, completing the translations for each of the different items and their forms for your chosen language. The first column in each worksheet lists the rulebase item in the original rule language. This column is protected and must be left unaltered, to enable Oracle Policy Modeling to map the translations you supply to the original rulebase element.
    NOTES:
    1. If the translation of an item is intended to be the same as in the original rule language (ie it is language-independent), click on the Ignore Translation button on the Oracle Policy Modeling toolbar. This will flag the item as not requiring translation and it will therefore be excluded from the Untranslated Text report.
    2. If your rulebase contains attributes using second person substitution, additional tabs for statements and variables will be created containing the second person substitution text for these attributes. In addition to columns for the Statement and Variable elements listed above, the second column contains the second person substitution attribute in the original rule language, which must also be left unaltered.
    3. If your rulebase contains variable substitution, use the substitution format "%<attribute public name>?%" (see Substitute an attribute value into the text on screens for other options using this syntax) to insert the desired attribute values into the translated text. The basic form of the 3rd person statement and variable entered in the Unformatted Text column will be used for substitution when the substituting attribute has an unknown value.
    4. If your attribute translations include gender pronoun substitution, as shown in the example above, ensure that you provide the three values required by Oracle Policy Automation (corresponding to male, female and neutral genders), even if the same values are used.
  6. When you have provided translations for all rulebase elements (or marked them as to be ignored for translation), compile the document using the Compile button in the Oracle Policy Modeling toolbar.
    TIP: You may also wish to translate any rulebase commentary you are using. See Localize interview help for details.
  7. You can now run the translation of the rulebase, or alternatively test it in the debugger by going to Build | Build and Debug in Oracle Policy Modeling, then select your chosen language as the Debugging Language in the Debug Options dialog. This drop-down list shows the main rule language, plus any other languages for which translations have been created.



    NOTE: If you debug with screens and select a Debugging Language for which Oracle Policy Modeling does not provide built-in support (see Localized function references for supported languages), you will need to set up the locale in Oracle Web Determinations.

  8. The rulebase will now run in the debugger, using your translations for rulebase questions etc, and built-in translations for the screen text of Oracle Web Determinations.

 

TIP: You can also preview the translation for individual question screens in Oracle Web Determinations without running a full interview, using the Preview option and selecting your new translation in the debug options.

Run a translation of a rulebase

Once you have created one or more translations for a rulebase as detailed above, you can then run the rulebase in Oracle Web Determinations to access a fully-translated interview for your rules.

  1. Open your rulebase with translations in Oracle Policy Modeling, and select Build | Build and Run.
  2. If you select to run your rulebase in Oracle Web Determinations, you will see a browser screen showing you the locales of the available language options in which the rulebase can be run. The options available include the main rule language, plus any other languages for which translations of the rulebase have been created. Select the translation you wish to run.
    TIP: The text in the list of locales is configurable. For more information, see Change the locale list in Oracle Web Determinations.
  3. The rulebase interview commences, in your selected translation.

 

Set up a new locale in Oracle Web Determinations

If you run your rulebase in Oracle Web Determinations and select a translation locale for which Oracle Policy Modeling does not provide built-in support (see Localized function references for supported languages), you may see an error message if the locale properties have not yet been configured.

 

You will need to create a configuration file to run the translation you selected in Oracle Web Determinations. To do this:

  1. In Windows Explorer, browse to the Release folder in which your Oracle Web Determinations is running, and go to \web-determinations\WEB-INF\classes\configuration
  2. Locate the messages.<locale>.properties file which corresponds to the original rulebase language for your rulebase. For example, messages.en.properties for a rulebase written in US English.
  3. Make a copy of this file, and rename it with the appropriate locale text for your translation. For example, messages.lv-LV.properties for a Latvian translation. (The required file name is also shown in the Oracle Web Determinations error message, as shown above).
  4. You may optionally open the new file in a text editor and enter translations for the various configuration items under the heading localised text for input controls. See the Oracle Policy Automation Developer's Guide for more information on the settings in this file.

Check for untranslated text in a rulebase

Once you have added translations to your rulebase, Oracle Policy Modeling will automatically detect whether any elements of the rulebase that require translation have not yet been translated. Warnings are generated at build time if this is the case, and you can also run a report that will list all untranslated text in the rulebase.

  1. To view this report, go to Reports | Untranslated Text.
  2. The Untranslated Text report is shown, listing all relevant rulebase elements for which a translation has not yet been supplied. This report will not show any items that have been marked as 'Ignore Translation' in the translation document.
    Items are grouped together, eg screen text, metadata, attributes with all forms that are missing translations.
    If multiple translations have been added to the rulebase, items are grouped within the separate translation files.



  3. Use this report to complete any missing translations, then click Regenerate at the top of the report to verify that all translations have been completed.
  4. The Error List will also show a warning if your rulebase has missing translations. Click on View | Error List to display this. Double-click on the warning message to open the Untranslated Text report.

Update a translation file

It is advisable to add a translation of a rulebase only after the bulk of rulebase development is complete. This will minimize the amount of rework needed in the translation if the main rulebase changes after the translation is done. However, Oracle Policy Modeling will automatically detect if any new items have been added to the rulebase that aren't reflected in the translation, and prompt you to ensure these are handled effectively.

To update a translation file:

  1. First check for any missing translations as detailed above, to determine whether updates to the translation file are required.
  2. Open the translation document by double-clicking it in the Project Explorer. When the document opens, Oracle Policy Modeling will automatically insert any missing rulebase elements which require a translation.



  3. Enter the translations for the newly inserted items (or mark the items as 'Ignore Translation'), using the process detailed above, and compile the translation document.
  4. Re-check for any missing translations using the Untranslated Text report or Error List, and debug or run your rulebase translation to test your changes.

 

NOTES:

  1. Oracle Policy Modeling will not remove content from your translation file, so if you change or remove items from the rulebase, you will need to manually check your translation file to make any necessary updates. If an item in the rulebase is modified, Oracle Policy Modeling will insert the updated item into the translation file, however if you wish to remove or re-use the old translation instead, you must manually make these changes.
  2. If substitution is enabled for any attributes after the rulebase has been translated, the existing translations will need to be manually updated. The quickest way to do this would be to add a new translation file and manually merge the changes (ie replace the statements for the affected attributes in the old file with the correct forms from the new file).

 

See also: