When to Use Message Catalogs [ Message Catalogs:Programmer's Guide ] MPE/iX 5.0 Documentation
Message Catalogs:Programmer's Guide
When to Use Message Catalogs
Using message catalogs to output messages is a convenient and efficient
method to create a user interface. You may want to use message catalogs
if you:
* Have prompts, error messages, informative messages, etc. that you
output to users.
* Plan to localize the application.
* Do not want to recompile each time you alter your messages.
* Want easy access to the messages.
Message catalogs allow you to have a consistent and logical method of
outputting messages to the user. The messages are separate from your
code; therefore, localization (translation to other languages) is more
efficient. Only the message catalog needs to be translated and all the
messages are in a defined area. Because the messages are apart from the
code, you won't need to retain the source code and recompile when you
make changes to the catalog.
The use of message catalogs allows you to create application message
catalogs with messages in a user's native language and access these
messages programmatically. Messages such as prompts, commands, error
messages, or conventions for date and time, can be stored in separate
ASCII editor files. As a result, you can create and maintain files
without changing the program itself.
Message catalogs are easily used. As shown in Figure 1.1, you open the
catalog from your application, read and output messages, then close the
catalog.
Figure 1.1. Message Catalog Access
MPE XL supports three message facilities:
* Application Message Facility
* System Message Facility
* HELP Facility
Each is used for a different cataloging task.
MPE/iX 5.0 Documentation