The purpose of this tool is to allow dynamic translation of the Oracle Forms modules.
The translations are stored in Oracle tables and read on loading of each dialog.
A dialog is provided to manage the translations (TRANSLATE.FMB).
The lists allow to select the particular module and the language you want to translate, then show all objects of the corresponding module.
The Options tab allow to translate the Radio group options button labels, Alert buttons and LOV column titles.
The translations are stored in 4 database tables:
TRANS_LANG that store the different languages
TRANS_ITEMS that store the items translations
TRANS_OBJECTS that store the single object translations (Window, Alert, LOV)
TRANS_OPTIONS that store the multi-option values for Radio Group option buttons, Alert button labels and LOV column titles.
How to populate these tables ?
A PL/SQL library is provided with the solution (translate.pll)
It contains a package (PKG_TRANSLATION) and 2 procedures.
One to store the information in the tables : store_translations()
One to read information and dynamically translate the module labels at runtime : read_translations()
1. When you want to populate the translation tables, use the following instruction in the When-New-Form-Instance trigger of the module:
PKG_TRANSLATION.store_translations('language_code');
Where language code in one of the code stored in the TRANS_LANG table.
e.g. PKG_TRANSLATION.store_translations('EN');
Once the translation are stored, you can remove this instruction and modify them with the TRANSLATE.FMB dialog.
2. To translate the screen, use the following instruction in the When-New-Form-Instance trigger of the module:
PKG_TRANSLATION.read_translations('language_code');
Where language code in one of the code stored in the TRANS_LANG table.
e.g. PKG_TRANSLATION.read_translations('FR');
As you can see, some objects are not automatically stored in the database, because it is not possible to get them at runtime:
. Option buttons for radio groups
. Alert buttons' label
. LOV column's title
So you will have to manually add them in the TRANSLATE.FMB dialog
Installation:
. Get the translate.zip file
. Unzip the translate.zip file
. create the database tables with the create_objects.sql SQL script
. add the languages you need in the TRANS_LANG table
. compile the TRANSLATE.FMB module
. attach the translate.pll library to your modules to store, then translate them at run time.