@c This file is part of the GNU gettext manual.
-@c Copyright (C) 1995-2019 Free Software Foundation, Inc.
+@c Copyright (C) 1995-2025 Free Software Foundation, Inc.
@c See the file gettext.texi for copying conditions.
@pindex gettext
The @code{gettext} program displays the native language translation of a
textual message.
-@noindent @strong{Arguments}
+@noindent @strong{Options and arguments}
@table @samp
@item -c @var{context}
This option is only for compatibility with the @samp{echo} program or shell
built-in. It has no effect.
+@item -n
+@opindex -n@r{, @code{gettext} option}
+This option has only an effect if the @code{-s} option is given. It
+suppresses the additional newline at the end.
+
+@item [@var{textdomain}] @var{msgid}
+Retrieve translated message corresponding to @var{msgid} from @var{textdomain}.
+
+@end table
+
+@noindent @strong{Informative output}
+
+@table @samp
@item -h
@itemx --help
@opindex -h@r{, @code{gettext} option}
@opindex --help@r{, @code{gettext} option}
Display this help and exit.
-@item -n
-@opindex -n@r{, @code{gettext} option}
-This option has only an effect if the @code{-s} option is given. It
-suppresses the additional newline at the end.
-
@item -V
@itemx --version
@opindex -V@r{, @code{gettext} option}
@opindex --version@r{, @code{gettext} option}
Output version information and exit.
-@item [@var{textdomain}] @var{msgid}
-Retrieve translated message corresponding to @var{msgid} from @var{textdomain}.
-
@end table
If the @var{textdomain} parameter is not given, the domain is determined from
@c This file is part of the GNU gettext manual.
-@c Copyright (C) 1995-2019 Free Software Foundation, Inc.
+@c Copyright (C) 1995-2025 Free Software Foundation, Inc.
@c See the file gettext.texi for copying conditions.
@pindex ngettext
The @code{ngettext} program displays the native language translation of a
textual message whose grammatical form depends on a number.
-@noindent @strong{Arguments}
+@noindent @strong{Options and arguments}
@table @samp
@item -c @var{context}
This option is only for compatibility with the @samp{gettext} program. It has
no effect.
+@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
+
+@noindent @strong{Informative output}
+
+@table @samp
@item -h
@itemx --help
@opindex -h@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
while ((optchar = getopt_long (argc, argv, "+c:d:eEhnsV", long_options, NULL))
!= EOF)
switch (optchar)
- {
- case '\0': /* Long option. */
- break;
- case 'c':
- context = optarg;
- break;
- case 'd':
- domain = optarg;
- break;
- case 'e':
- do_expand = true;
- break;
- case 'E':
- /* Ignore. Just for compatibility. */
- break;
- case 'h':
- do_help = true;
- break;
- case 'n':
- inhibit_added_newline = true;
- break;
- case 's':
- do_shell = true;
- break;
- case 'V':
- do_version = true;
- break;
- default:
- usage (EXIT_FAILURE);
- }
+ {
+ case '\0': /* Long option. */
+ break;
+ case 'c':
+ context = optarg;
+ break;
+ case 'd':
+ domain = optarg;
+ break;
+ case 'e':
+ do_expand = true;
+ break;
+ case 'E':
+ /* Ignore. Just for compatibility. */
+ break;
+ case 'h':
+ do_help = true;
+ break;
+ case 'n':
+ inhibit_added_newline = true;
+ break;
+ case 's':
+ do_shell = true;
+ break;
+ case 'V':
+ do_version = true;
+ break;
+ default:
+ usage (EXIT_FAILURE);
+ }
/* Version information is requested. */
if (do_version)
printf (_("\
Display native language translation of a textual message.\n"));
printf ("\n");
+ printf (_("\
+Options and arguments:\n"));
/* xgettext: no-wrap */
printf (_("\
-d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN\n"));
while ((optchar = getopt_long (argc, argv, "+c:d:eEhV", long_options, NULL))
!= EOF)
switch (optchar)
- {
- case '\0': /* Long option. */
- break;
- case 'c':
- context = optarg;
- break;
- case 'd':
- domain = optarg;
- break;
- case 'e':
- do_expand = true;
- break;
- case 'E':
- /* Ignore. Just for compatibility. */
- break;
- case 'h':
- do_help = true;
- break;
- case 'V':
- do_version = true;
- break;
- default:
- usage (EXIT_FAILURE);
- }
+ {
+ case '\0': /* Long option. */
+ break;
+ case 'c':
+ context = optarg;
+ break;
+ case 'd':
+ domain = optarg;
+ break;
+ case 'e':
+ do_expand = true;
+ break;
+ case 'E':
+ /* Ignore. Just for compatibility. */
+ break;
+ case 'h':
+ do_help = true;
+ break;
+ case 'V':
+ do_version = true;
+ break;
+ default:
+ usage (EXIT_FAILURE);
+ }
/* Version information is requested. */
if (do_version)
Display native language translation of a textual message whose grammatical\n\
form depends on a number.\n"));
printf ("\n");
+ printf (_("\
+Options and arguments:\n"));
/* xgettext: no-wrap */
printf (_("\
-d, --domain=TEXTDOMAIN retrieve translated message from TEXTDOMAIN\n"));