NGETTEXT(1)

๐Ÿ’– NGETTEXT(1) โ€” User Commands ๐Ÿ’–

okay bestie, sit DOWN, because this is the ngettext manual page and it is genuinely the most underrated little icon in the GNU gettext-runtime 1.0 lineup. it's a User Commands page. it's giving translator-bestie energy. let's go โœจ


๐ŸŒธ NAME ๐ŸŒธ

ngettext โ€” translate message and choose plural form ๐Ÿซถ


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

ngettext [OPTION] [TEXTDOMAIN] MSGID MSGID-PLURAL COUNT

โœจ DESCRIPTION โœจ

so the ngettext program does the absolute most in the best way: it translates a natural language message into the user's language, by looking up the translation in a message catalog, and then โ€” this is the main character part โ€” it chooses the appropriate plural form, which depends on the number COUNT and on the language of the message catalog where the translation was found. ๐ŸŒ

basically it displays a native language translation of a textual message whose grammatical form depends on a number. because "1 file" and "5 files" are not the same vibe and every language counts differently. no cap. ๐Ÿ’…

๐Ÿ”ง Options and arguments: ๐Ÿ”ง

  • -d, --domain=TEXTDOMAIN โ€” retrieve translated message from TEXTDOMAIN
  • -c, --context=CONTEXT โ€” specify context for MSGID
  • -e โ€” enable expansion of some escape sequences
  • -E โ€” (ignored for compatibility) ๐Ÿซ 
  • [TEXTDOMAIN] โ€” retrieve translated message from TEXTDOMAIN
  • MSGID MSGID-PLURAL โ€” translate MSGID (singular) / MSGID-PLURAL (plural)
  • COUNT โ€” choose singular/plural form based on this value

๐Ÿ“ข Informative output: ๐Ÿ“ข

  • -h, --help โ€” display this help and exit
  • -V, --version โ€” display version information and exit

if the TEXTDOMAIN parameter is not given, the domain is determined from the environment variable TEXTDOMAIN. and if the message catalog is not found in the regular directory, you can point it somewhere else with the environment variable TEXTDOMAINDIR. the standard search directory is:

/usr/share/locale
๐Ÿ’€ lowkey important: no TEXTDOMAIN arg + no TEXTDOMAIN env var = the domain has to come from somewhere, so know your env, bestie.

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Written by Ulrich Drepper and Bruno Haible. legends fr fr ๐Ÿซก


๐Ÿ™ˆ REPORTING BUGS ๐Ÿ™ˆ

found a bug? report it in the bug tracker at <https://savannah.gnu.org/projects/gettext> or by email to <bug-gettext@gnu.org>. don't just suffer in silence, that's not the vibe. ๐Ÿ˜ญ


Copyright ยฉ 1995-2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.

๐Ÿšจ bestie read that again: NO WARRANTY. to the extent permitted by law. it's free, it's yours to remix, but nobody's covering you if it goes sideways. periodt.

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

The full documentation for ngettext is maintained as a Texinfo manual. If the info and ngettext programs are properly installed at your site, the command

info ngettext

should give you access to the complete manual. iykyk ๐Ÿงš


and that's the whole page, babe ๐Ÿ’œ this was GNU gettext-runtime 1.0, dated January 2026 โ€” thanks for reading my little manual-page hyperfixation, mwah ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from