catgets(1) DG/UX 5.4R3.00 catgets(1)
NAME
catgets - print message from message catalog
SYNOPSIS
catgets catalogname setnumber messagenumber defaultmessage
where:
catalogname Is the name of the compiled message catalog (e.g.
perror.cat).
setnumber Is the number of the message set within the message
catalog.
messagenumber Is the number of the message within the set.
defaultmessage Is the default string to use if the message catlog is
not available, or the specified message is missing.
This string must be a single argument to catgets,
which means that if it contains any space(s), it must
be quoted.
DESCRIPTION
The catgets command performs a function very similar to the
catgets(3C) subroutine -- it extracts a message from an X/Open-style
message catalog. The message catalog to use is selected on the basis
of the catalogname argument, and the values of the NLSPATH and LANG
environment variables (see catopen(3C)). The designated string is
printed to catgets's standard output. If the designated catalog is
not available, or does not contain the message specified by setnumber
and messagenumber, then the defaultmessage string is printed.
EXAMPLES
catgets lp.sh1.cat 1 7 "Enter name of lp device:"
This command attempts to retrieve message number 7 from set number 1
in message catalog lp.sh1.cat, in the directory specified by the
NLSPATH and LANG environment variables. If that is successful, that
message is printed; otherwise Enter name of lp device: is printed.
FILES
/usr/lib/nls/msg/$LANG/catalogname Default location of message
catalog.
SEE ALSO
gencat(1),
catopen(3C), catgets(3C), setlocale(3C),
environ(5).
gettxt(1) -- AT&T-style message facility.
Licensed material--property of copyright holder(s) 1