1@pindex gettext
2@cindex @code{gettext} program, usage
3@example
4gettext [@var{option}] [[@var{textdomain}] @var{msgid}]
5gettext [@var{option}] -s [@var{msgid}]...
6@end example
7
8@cindex lookup message translation
9The @code{gettext} program displays the native language translation of a
10textual message.
11
12@noindent @strong{Arguments}
13
14@table @samp
15@item -d @var{textdomain}
16@itemx --domain=@var{textdomain}
17@opindex -d@r{, @code{gettext} option}
18@opindex --domain@r{, @code{gettext} option}
19Retrieve translated messages from @var{textdomain}.  Usually a @var{textdomain}
20corresponds to a package, a program, or a module of a program.
21
22@item -e
23@opindex -e@r{, @code{gettext} option}
24Enable expansion of some escape sequences.  This option is for compatibility
25with 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
28interpreted like the System V @samp{echo} program did.
29
30@item -E
31@opindex -E@r{, @code{gettext} option}
32This option is only for compatibility with the @samp{echo} program or shell
33built-in.  It has no effect.
34
35@item -h
36@itemx --help
37@opindex -h@r{, @code{gettext} option}
38@opindex --help@r{, @code{gettext} option}
39Display this help and exit.
40
41@item -n
42@opindex -n@r{, @code{gettext} option}
43Suppress trailing newline.  By default, @code{gettext} adds a newline to
44the output.
45
46@item -V
47@itemx --version
48@opindex -V@r{, @code{gettext} option}
49@opindex --version@r{, @code{gettext} option}
50Output version information and exit.
51
52@item [@var{textdomain}] @var{msgid}
53Retrieve translated message corresponding to @var{msgid} from @var{textdomain}.
54
55@end table
56
57If the @var{textdomain} parameter is not given, the domain is determined from
58the environment variable @code{TEXTDOMAIN}.  If the message catalog is not
59found in the regular directory, another location can be specified with the
60environment variable @code{TEXTDOMAINDIR}.
61
62When used with the @code{-s} option the program behaves like the @samp{echo}
63command.  But it does not simply copy its arguments to stdout.  Instead those
64messages found in the selected catalog are translated.
65