To accommodate a user, a program must display titles, menu choices, and status messages in that user's language. Usually such text is stored in a message catalog or resource file, separate from program code, so it may be easily edited or replaced. The Essential Tools Module does not display titles or menus directly, but does return status messages when errors occur. By default, the Essential Tools Module makes no attempt to localize these messages. Instead, it provides an optional facility that allows error messages to be retrieved from your own catalog.
The facility can be used in one of four modes:
These localization techniques and their documentation are specific to your platform. Once you discover what your system provides, you specify that mode for the Essential Tools Module by setting the appropriate switch in <rw/compiler.h> before compiling the library. If you have object code, this choice has already been made for you.
Function catgets() uses both a message set number and a message number within that set to look up a localized version of a message. The number for the message set to use is defined in the macro RW_MESSAGE_SET_NUMBER found in <rw/compiler.h>. Function gettext() uses the message itself. The messages and their respective message numbers are given in Appendix C.
For information on using catgets(), gettext(), and dgettext(), refer to your compiler documentation.
©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.