Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module User's Guide

8.3 Localizing Messages

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:

Mode Define

No messaging

RW_NOMSG

Use catgets()

RW_CATGETS

Use gettext()

RW_GETTEXT

Use dgettext()

RW_DGETTEXT

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.



Previous fileTop of DocumentContentsIndex pageNext file

©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.