The natural language feature enables users of an application program to communicate with the computer system in their natural language. A natural language is a human language in contrast to a computer programming language.
A program must be written in the subset of the standard EBCDIC character set defined by the ALGOL language. Only the contents of string literals, data items with variable character data, or comments can be in a character set other than that subset.
If a program interacts with a user, has a user interface with screens or forms, displays messages or accepts user input, then those aspects of the program should be in the natural language of the user. For example, French would be the natural language of a person from France. Refer to the MultiLingual System Administration, Operations, and Programming Guide for a list of user interfaces, including screens or forms, that can be localized. The following text explains how to develop an ALGOL application program, which supports messages in the natural language of the user.
Although you can use many natural languages, one is defined as the default for the entire system. You can override this default and access texts in another language, as long as they have been translated and identified to the system.
Creating Messages for an Application Program
In the MLS environment, the messages handled by your application program are grouped into the following categories:
|
Message Category |
Explanation |
|
Output message |
A message that an application program displays to the user. Some examples of output messages are error messages and prompts for input. An output message is localized so that it can be displayed in the language of the user. |
|
Input message |
A message received by an interactive program either from a user or from another program in response to a prompt for input. The input message might be in a language that the program cannot recognize. In this case, the message must be translated so that it can be understood by the program. |
If you develop input and output messages within an output message array, you make the localization process easier. When messages are in an output message array, a translator can use the MSGTRANS utility to localize the messages into one or more natural languages. The MSGTRANS utility finds all output message arrays in a program and presents them to a translator for translation. If messages are not in output message arrays, a translator searches the source file for each message and then translates the message.
An output message array contains output messages to be used by the MLS environment. See OUTPUTMESSAGE ARRAY Declaration.
Creating Multilingual Messages for Translation
The following are guidelines for creating messages that can be multilingual:
-
Put all output messages in output message arrays.
-
Allow more space for translated messages. Because the English language is more compact than many other natural languages, a message in English generally becomes about 33 percent longer after it is translated into another language. For example, if a program can display an 80-character message, an English message should be only 60 characters long so that the translated message can expand by one-third and not exceed the maximum display size.
-
Accept or display any messages in the application program using the MLSACCEPT statement or the MLSDISPLAY statement. For more information, see Statements.
-
Use complete sentences for messages because phrases are difficult to translate accurately.
-
Do not use abbreviations because they also are difficult to translate.

