iSeries home   |   Easy400     |   CGIDEV2  
Public source
 
Introduction
Start a translation
Perform a translation
Work with a directory
Translations
Save files
A few commands
Appendix A
 
Download
 
 

 
BABEL_I
A few commands
 
Though BABEL_I is designed for execution from WEB pages, a few commands are also available from 5250 green screen terminals.

1. Command SAVDCT - Save translation dictionary entries

Figure 26 - Command SAVDCT

BABEL_I-based national language translated texts are stored in a "translation dictionary", database file BABEL_IDTA/XLTDCT.
This is done in order to re-use translation texts in subsequent translations.

In the long run the size of this "translation dictionary" may become too large, thus creating the need to save it - or part of it - to some offline media.

You may use command BABEL_I/SAVDCT to save from the "translation dictionary" entries related to one or more translations by storing them into a stream file. You may then export this "save" stream file to some offline media, example: a PC.

If you specify RMV(*YES), the saved entries are removed from the "translation dictionary", thus reducing its size.

Note: It is suggested that you perform the save at least at the end of the translation of a single application in order to have a backup for future maintenance and to save space for the online "translation dictionary".

To re-import saved entries to the online "translation" dictionary, you will use command BABEL_I/RSTDCT.

Command parameters:
  • Referenced HTML file(s) (REFHTMLF) - Path of HTML stream file(s) that did undergo translation to one or more national languages. The command saves the translation entries related to the stream files in this path.
    Examples: suppose that you used BABEL_I to translate from English language to French language your application "Application 1" and that its HTML English language stream files are located in IFS directory /application1/html/english.
    If you specify:
    • REFHTMLF('/application1/html/english/intro.html'), only the translation dictionary entries related to this HTML stream file are saved.
    • REFHTMLF('/application1/html/english/*'), the translation dictionary entries related to all the HTML stream files in this generic path are saved.
    • REFHTMLF(*ALL), the translation dictionary entries related to any HTML stream file are saved.
  • To save file (SAVF) - The name of the stream file receiving the saved translation entries.
    Example: /tmp/Application1_TranslationData.txt.
    • If this save file does not exist, it is automatically created.
    • If this save file already exists, you must specify CLEAR(*YES) to have it cleared before receiving the saved entries.
  • From national language(s) (FRMLNG) - A three characters identifier of the language used in the REFHTMLF file(s). Only the dictionary entries with this "source" national language are saved.
    If you specify *ALL, dictionary entries with whatever "source" national language are saved.
  • To national language(s) (FRMLNG) - Up to 10 three characters identifiers of the "target" national languages eligible for save.
    If you specify *ALL, dictionary entries with whatever "target" national language are saved.
  • Clear save file (CLEAR) - If the save file already exists and you want to save dictionary entries there, you must specify CLEAR(*YES) to clear the save file before performimg the save.
    If you specify CLEAR(*NO) and the save file already exists, you receive an error message.
  • Remove saved entries (RMV) - Whether the saved dictionary entries should be removed from the online database dictionary after having been saved.
    Removed dictionary entries can be later on restored with command RSTDCT.

2. Command RSTDCT - Restore translation dictionary entries

Figure 27 - Command RSTDCT

Use this command to restore entries from a translation dictionary save file to the online translation dictionary database file BABEL_IDTA/XLTDCT.

Command parameters:
  • Save file (SAVF) - Name of the dictionary save file containing the dictionary entries that you want to restore
  • Referenced HTML file(s) (REFHTMLF) - One of the following:
    • The name of the HTML stream file referenced from the saved dictionary entries that you want to restore
    • A generic* HTML stream file name, to restore all the dictionary entries referenced by the HTML stream files matching this generic name
    • *ALL, to restore all the dictionary entries in the save file.
  • Translation "from" language (FRMLNG):
    • A three characters national language identifier, to restore only the entries related to this "before translation" national language, OR
    • *ALL, to restore entries of whatever "before translation" national language
  • Translation "to" language (TOLNG):
    • A three characters national language identifier, to restore only the entries related to this "after translation" national language, OR
    • *ALL, to restore entries of whatever "after translation" national language
  • Restore option (RSTOPT) - Enter
    • *OLD, to restore only entries already existing in the translation dictionary
    • *NEW, to restore only entries no longer existing in the translation dictionary
    • *ALL, to restore entries independently from their existence in the translation dictionary.

3. Command WRKSAVF - Work with save files

Figure 28 - Command WRKSAVF

  • Save file (SAVF) - One of the following:
    • The name of a translation dictionary save file you want to work with
    • A generic* name identifying the set of translation dictionary save files you want to work with
    • *ALL, to work with all the existing translation dictionary save files.

Figure 29 - List of save files
Figure 30 - Table of contents

If you specify *ALL save files, you get a list of the existing save files (Figure 29).

Select with a 1 a save file to display its contents table (Figure 30).

  • Press F4 to display the save file entries (Figure 31)
  • Press F7 to run command RSTDCT from this save file(Figure 32)

Figure 31 - Inside a save file
Figure 32 - Restoring a save file
Contact