2 @cindex @code{gettext} program, usage
4 gettext [@var{option}] [[@var{textdomain}] @var{msgid}]
5 gettext [@var{option}] -s [@var{msgid}]...
8 @cindex lookup message translation
9 The @code{gettext} program displays the native language translation of a
12 @noindent @strong{Arguments}
15 @item -d @var{textdomain}
16 @itemx --domain=@var{textdomain}
17 @opindex -d@r{, @code{gettext} option}
18 @opindex --domain@r{, @code{gettext} option}
19 Retrieve translated messages from @var{textdomain}. Usually a @var{textdomain}
20 corresponds to a package, a program, or a module of a program.
23 @opindex -e@r{, @code{gettext} option}
24 Enable expansion of some escape sequences. This option is for compatibility
25 with the @samp{echo} program or shell built-in. The escape sequences
26 @samp{\a}, @samp{\b}, @samp{\c}, @samp{\f}, @samp{\n}, @samp{\r}, @samp{\t},
27 @samp{\v}, @samp{\\}, and @samp{\} followed by one to three octal digits, are
28 interpreted like the SystemV @samp{echo} program does.
31 @opindex -E@r{, @code{gettext} option}
32 This option is only for compatibility with the @samp{echo} program or shell
33 built-in. It has no effect.
37 @opindex -h@r{, @code{gettext} option}
38 @opindex --help@r{, @code{gettext} option}
39 Display this help and exit.
42 @opindex -n@r{, @code{gettext} option}
43 Suppress trailing newline. By default, @code{gettext} adds a newline to
48 @opindex -V@r{, @code{gettext} option}
49 @opindex --version@r{, @code{gettext} option}
50 Output version information and exit.
52 @item [@var{textdomain}] @var{msgid}
53 Retrieve translated message corresponding to @var{msgid} from @var{textdomain}.
57 If the @var{textdomain} parameter is not given, the domain is determined from
58 the environment variable @code{TEXTDOMAIN}. If the message catalog is not
59 found in the regular directory, another location can be specified with the
60 environment variable @code{TEXTDOMAINDIR}.
62 When used with the @code{-s} option the program behaves like the @samp{echo}
63 command. But it does not simply copy its arguments to stdout. Instead those
64 messages found in the selected catalog are translated.