Next: , Previous: , Up: sh - Shell Script   [Contents][Index] Invoking the ngettext program

ngettext [option] [textdomain] msgid msgid-plural count

The ngettext program displays the native language translation of a textual message whose grammatical form depends on a number.


-c context

Specify the context for the messages to be translated. See Using contexts for solving ambiguities for details.

-d textdomain

Retrieve translated messages from textdomain. Usually a textdomain corresponds to a package, a program, or a module of a program.


Enable expansion of some escape sequences. This option is for compatibility with the ‘gettext’ program. The escape sequences ‘\a’, ‘\b’, ‘\f’, ‘\n’, ‘\r’, ‘\t’, ‘\v’, ‘\\’, and ‘\’ followed by one to three octal digits, are interpreted like the System V ‘echo’ program did.


This option is only for compatibility with the ‘gettext’ program. It has no effect.


Display this help and exit.


Output version information and exit.


Retrieve translated message from textdomain.

msgid msgid-plural

Translate msgid (English singular) / msgid-plural (English plural).


Choose singular/plural form based on this value.

If the textdomain parameter is not given, the domain is determined from the environment variable TEXTDOMAIN. If the message catalog is not found in the regular directory, another location can be specified with the environment variable TEXTDOMAINDIR.

Note: xgettext supports only the three-arguments form of the ngettext invocation, where no options are present and the textdomain is implicit, from the environment.

Next: Invoking the envsubst program, Previous: Invoking the gettext program, Up: sh - Shell Script   [Contents][Index]