gettext(1scl)gettext(1scl)NAMEgettext - retrieve text string from message database
SYNOPSISgettext [option] [[[textdomain] msgid] | [-s [msgid]...]]
The gettext command obtains and outputs a translated text string from a
message object. The string corresponds to the supplied msgid string.
The message object is a file generated by the msgfmt(1scl) command.
The textdomain argument (if present) is used to specify the message
object file that is searched. If the textdomain argument is not speci‐
fied, the TEXTDOMAIN environment variable is used.
If no text domain is specified, or a translated string cannot be found,
then msgid is output.
By default, gettext searches for the message object in
/usr/local/share/locale/lang/LC_MESSAGES where lang is the locale name
specified with the LANG or LC_MESSAGES environment variable. The
TEXTDOMAINDIR environment variable can be used to specify an alterna‐
tive location, replacing the pathname component up to lang.
Unlike the Solaris implementation, there are a number of options that
can be specified with this command. Type gettext-h to display their
Specifies the locale name Specifies the messaging locale name, overrid‐
ing LANG for messages Specifies the text domain name in which the msgid
is searched. Specifies the location of the message database.
If the LANG environment variable is set to a valid value for the sys‐
tem, then the corresponding locale category values will change to
match. The command locale -a will display a list of valid locale values
to which LANG can be defined.
If LANG is defined to be an invalid value, the corresponding locale
categories will not change and so an environment value for LC_MESSAGES
must be defined. This will specify the location of the message database
beneath the locale directory.
This command is implemented by the GNU gettext package. This is not
supplied with SCL but can be downloaded from GNU distribution sites or
obtained from the Freeware Source CD that is supplied with Tru64 UNIX.
Additional documentation about this command can be obtained by using
the info command once GNU gettext has been installed.
Commands: locale(1), msgfmt(1scl)
Manual: Solaris Compatibility Library User's Guide