1@c This file is part of the GNU gettext manual. 2@c Copyright (C) 1995-2019 Free Software Foundation, Inc. 3@c See the file gettext.texi for copying conditions. 4 5@pindex ngettext 6@cindex @code{ngettext} program, usage 7@example 8ngettext [@var{option}] [@var{textdomain}] @var{msgid} @var{msgid-plural} @var{count} 9@end example 10 11@cindex lookup plural message translation 12The @code{ngettext} program displays the native language translation of a 13textual message whose grammatical form depends on a number. 14 15@noindent @strong{Arguments} 16 17@table @samp 18@item -c @var{context} 19@itemx --context=@var{context} 20@opindex -c@r{, @code{ngettext} option} 21@opindex --context@r{, @code{ngettext} option} 22Specify the context for the messages to be translated. 23See @ref{Contexts} for details. 24 25@item -d @var{textdomain} 26@itemx --domain=@var{textdomain} 27@opindex -d@r{, @code{ngettext} option} 28@opindex --domain@r{, @code{ngettext} option} 29Retrieve translated messages from @var{textdomain}. Usually a @var{textdomain} 30corresponds to a package, a program, or a module of a program. 31 32@item -e 33@opindex -e@r{, @code{ngettext} option} 34Enable expansion of some escape sequences. This option is for compatibility 35with the @samp{gettext} program. The escape sequences 36@samp{\a}, @samp{\b}, @samp{\f}, @samp{\n}, @samp{\r}, @samp{\t}, 37@samp{\v}, @samp{\\}, and @samp{\} followed by one to three octal digits, are 38interpreted like the System V @samp{echo} program did. 39 40@item -E 41@opindex -E@r{, @code{ngettext} option} 42This option is only for compatibility with the @samp{gettext} program. It has 43no effect. 44 45@item -h 46@itemx --help 47@opindex -h@r{, @code{ngettext} option} 48@opindex --help@r{, @code{ngettext} option} 49Display this help and exit. 50 51@item -V 52@itemx --version 53@opindex -V@r{, @code{ngettext} option} 54@opindex --version@r{, @code{ngettext} option} 55Output version information and exit. 56 57@item @var{textdomain} 58Retrieve translated message from @var{textdomain}. 59 60@item @var{msgid} @var{msgid-plural} 61Translate @var{msgid} (English singular) / @var{msgid-plural} (English plural). 62 63@item @var{count} 64Choose singular/plural form based on this value. 65 66@end table 67 68If the @var{textdomain} parameter is not given, the domain is determined from 69the environment variable @code{TEXTDOMAIN}. If the message catalog is not 70found in the regular directory, another location can be specified with the 71environment variable @code{TEXTDOMAINDIR}. 72