gettext: gettext Invocation
1
1 15.5.2.3 Invoking the ‘gettext’ program
1 .......................................
1
1 gettext [OPTION] [[TEXTDOMAIN] MSGID]
1 gettext [OPTION] -s [MSGID]...
1
1 The ‘gettext’ program displays the native language translation of a
1 textual message.
1
1 *Arguments*
1
1 ‘-d TEXTDOMAIN’
1 ‘--domain=TEXTDOMAIN’
1 Retrieve translated messages from TEXTDOMAIN. Usually a TEXTDOMAIN
1 corresponds to a package, a program, or a module of a program.
1
1 ‘-e’
1 Enable expansion of some escape sequences. This option is for
1 compatibility with the ‘echo’ program or shell built-in. The
1 escape sequences ‘\a’, ‘\b’, ‘\c’, ‘\f’, ‘\n’, ‘\r’, ‘\t’, ‘\v’,
1 ‘\\’, and ‘\’ followed by one to three octal digits, are
1 interpreted like the System V ‘echo’ program did.
1
1 ‘-E’
1 This option is only for compatibility with the ‘echo’ program or
1 shell built-in. It has no effect.
1
1 ‘-h’
1 ‘--help’
1 Display this help and exit.
1
1 ‘-n’
1 Suppress trailing newline. By default, ‘gettext’ adds a newline to
1 the output.
1
1 ‘-V’
1 ‘--version’
1 Output version information and exit.
1
1 ‘[TEXTDOMAIN] MSGID’
1 Retrieve translated message corresponding to MSGID from TEXTDOMAIN.
1
1 If the TEXTDOMAIN parameter is not given, the domain is determined
1 from the environment variable ‘TEXTDOMAIN’. If the message catalog is
1 not found in the regular directory, another location can be specified
1 with the environment variable ‘TEXTDOMAINDIR’.
1
1 When used with the ‘-s’ option the program behaves like the ‘echo’
1 command. But it does not simply copy its arguments to stdout. Instead
1 those messages found in the selected catalog are translated.
1
1 Note: ‘xgettext’ supports only the one-argument form of the ‘gettext’
1 invocation, where no options are present and the TEXTDOMAIN is implicit,
1 from the environment.
1