This command retrieves a translated text string corresponding to msgid from a message file generated using the tnmsgfmt command. The message file name comes from the domain argument, if present, or from the TEXTDOMAIN environment variable. The domain text names a domain, like the message file name without the .mo suffix. If you specify no domain or if no corresponding string exists, tngettext prints msgid.
This command looks for its message object in the directory TNHOME/usr/lib/locale/msgs/lang, where TNHOME represents the TotalNET home directory /var/opt/totalnet. The lang variable represents the locale name. The value of lang comes from the value of either the LC_MESSAGES or LANG environment variables, checked in that order; if neither of these variables exists, tngettext prints msgid. If one or both exist, tngettext appends the value of the LC_CHARSET environment variable to the path name. For example, message files for the shift-jis character set reside in TNHOME/usr/lib/locale/msgs/lang/shift-jis.
The tngettext command reads C escape sequences. Use \t for a tab and \\ for a backslash. To set a message on a line of its own, either add \n at the end of msgid or use tngettext in conjunction with the UNIX printf command. For more information, refer to the UNIX printf(1) man page.
TNHOME/usr/bin
tngettext [domain] "msgid"
LANG |
Specify a local name. |
LC_MESSAGES |
Specify a messaging locale. If specified, this overrides LANG for messages. |
LC_CHARSET |
Specify a messaging character set. If specified, this selects a character set directory to search for the message object file. |
TEXTDOMAIN |
Specify the domain name of interest. The tngettext command uses TEXTDOMAIN only if you omit tngettext's domain argument. |
TEXTDOMAINDIR |
Specify the path name to the message database. If present, this replaces TNHOME/usr/lib/locale/msgs. |