Tools.h++ Manual

104011 Tandem Computers Incorporated 19-9
19
19.4 Localizing messages
Tools.h++ includes a facility for localizing messages, that is, formatting them in
the native language of the user. This facility is used to localize exception
messages, to be passed to
xmsg
(see Section 18.3, “Exception architecture,” on
page 7 in Chapter 18, “Errors”). 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
You select which mode to use by setting the appropriate switch in
<rw/compiler.h>
before compiling the library.
Function
catgets()
uses a message number to look up a localized version of
a message. Function
gettext()
uses the message itself. These are
documented in your run time library that comes with your compiler. The
messages and their respective message numbers are given in Appendix C.