summaryrefslogtreecommitdiffstats
path: root/gettext-runtime/doc/rt-ngettext.texi
blob: 1b8c5a7032b788965b8cce66decd018ea3b50d55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@pindex ngettext
@cindex @code{ngettext} program, usage
@example
ngettext [@var{option}] [@var{textdomain}] @var{msgid} @var{msgid-plural} @var{count}
@end example

@cindex lookup plural message translation
The @code{ngettext} program displays the native language translation of a
textual message whose grammatical form depends on a number.

@noindent @strong{Arguments}

@table @samp
@item -d @var{textdomain}
@itemx --domain=@var{textdomain}
@opindex -d@r{, @code{ngettext} option}
@opindex --domain@r{, @code{ngettext} option}
Retrieve translated messages from @var{textdomain}.  Usually a @var{textdomain}
corresponds to a package, a program, or a module of a program.

@item -e
@opindex -e@r{, @code{ngettext} option}
Enable expansion of some escape sequences.  This option is for compatibility
with the @samp{gettext} program.  The escape sequences
@samp{\a}, @samp{\b}, @samp{\c}, @samp{\f}, @samp{\n}, @samp{\r}, @samp{\t},
@samp{\v}, @samp{\\}, and @samp{\} followed by one to three octal digits, are
interpreted like the System V @samp{echo} program did.

@item -E
@opindex -E@r{, @code{ngettext} option}
This option is only for compatibility with the @samp{gettext} program.  It has
no effect.

@item -h
@itemx --help
@opindex -h@r{, @code{ngettext} option}
@opindex --help@r{, @code{ngettext} option}
Display this help and exit.

@item -V
@itemx --version
@opindex -V@r{, @code{ngettext} option}
@opindex --version@r{, @code{ngettext} option}
Output version information and exit.

@item @var{textdomain}
Retrieve translated message from @var{textdomain}.

@item @var{msgid} @var{msgid-plural}
Translate @var{msgid} (English singular) / @var{msgid-plural} (English plural).

@item @var{count}
Choose singular/plural form based on this value.

@end table

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