

IBM i General Design Standards › Design Standards for Internationalization › Considerations for MRI (text) Translation
Considerations for MRI (text) Translation
The fundamental principle for handling MRI is that all text literals should be isolated from the HLL code for the application, whether for a program (RPG III, CL, COBOL, PL/1, C) or a device file (DSPF, PRTF) or a command (CMD). Some specific programming requirements are given later on. There are several sorts of text that may need translating:
- Command prompt text: Although externally defined messages are supported by the PROMPT keyword of the CL command definition language, the OS/400 command compiler compiles command text into command objects at compile time—it is "early binding". You will need separate sets of commands for each national language, which you will probably want as the commands are used to set the product library.
An example of an early binding text:

- Device file constant text. The DDS MSGCON and MSGID keywords allow the use of external message descriptions. In effect, MSGCOn is early binding; MSGID is late binding. MSGID is preferred for panels as it gives greater flexibility, but is not supported for print device files. (You may emulate MSGID for print files by defining fields and using a CL program with the OS/400 Retrieve message description (RTVMSGD) command—or the V2R2 OS/400 QMHRTVM API—to retrieve the text within the program).
An example of an early binding device text - PRTF MSGCON:

An example of a late binding device text - DSPF MSGID:

- Execution message text. This text will vary at runtime, and so should be "late binding". All such messages should be placed in a message file and retrieved as required by a standard CL message-sending program, or from V2R2, an OS/400 message handling API QMHSNDPM.
Late binding text with explicit message sending:
- Text in database file fields. Certain text items will probably be held in the form of database field values in database files, for instance code descriptions. If such items need translation, conversion utilities will be needed to retain translations through version upgrades.
Late binding text - database fields such as the following:

- Help text. UIM Help text is compiled. Separate source is required for each national language. You should use message descriptions with the text for headings and standard terms to ensure consistency and fast translation.
An example of an early binding device text - UIM help text:

Since help text is created automatically for programs generated with the CA 2E application generator, translating the application model and skeleton help text and regenerating is sufficient to translate end-user help text.
- Menu text. On iSeries, menus are normally display files and can be treated as normal device files for the purposes of translation.
Copyright © 2014 CA.
All rights reserved.
 
|
|