PRINTF_GETTEXT(1)

๐Ÿ“ฆ
version 1.0 ยท 4 versions
, in alpine 3.24, arch rolling, ubuntu stonking

๐Ÿ’– PRINTF_GETTEXT ๐Ÿ’–

okay bestie, welcome to printf_gettext (that's the (1) in the manual โ€” it's a User Command, one of the lil executable ones, iykyk) ๐ŸŽ€


โœจ NAME โœจ

printf_gettext โ€” translate format string and apply it ๐Ÿฆ‹


๐ŸŒธ SYNOPSIS ๐ŸŒธ

printf_gettext [OPTION] FORMAT [ARGUMENT]...

๐Ÿ’… DESCRIPTION ๐Ÿ’…

okay so. The printf_gettext program takes a format string and translates it into the user's language, by looking up the translation in a message catalog, and then applies the translated format string to the arguments you gave it. Iconic behaviour honestly.

It produces formatted output, applying the native language translation of FORMAT to the *ARGUMENT*s. That's the whole vibe. ๐Ÿซถ


๐ŸŽ€ Options and arguments: ๐ŸŽ€

  • -c, --context=CONTEXT โ€” specify context for FORMAT
  • FORMAT โ€” format string
  • ARGUMENT โ€” string or numeric argument

โญ Informative output: โญ

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

๐Ÿงš The format string, bestie ๐Ÿงš

The format string consists of:

  • plain text,
  • directives, that start with %,
  • escape sequences, that start with a backslash.

๐Ÿ’œ A directive that consumes an argument ๐Ÿ’œ

  • starts with % or %m$ where m is a positive integer,
  • is optionally followed by any of the characters #, 0, -, , +,

each of which acts as a flag,

  • is optionally followed by a width specification (a nonnegative integer),
  • is optionally followed by . and a precision specification (an optional

nonnegative integer),

  • is finished by a specifier
  • c, that prints a character,
  • s, that prints a string,
  • i, d, that print an integer,
  • u, o, x, X, that print an unsigned (nonnegative) integer,
  • e, E, that print a floating-point number in scientific notation,
  • f, F, that print a floating-point number without an exponent,
  • g, G, that print a floating-point number in general notation,
  • a, A, that print a floating-point number in hexadecimal notation.

Additionally there is the directive %%, that prints a single %. slay ๐Ÿ’…

okay so important one: If a directive specifies the argument by its number (%m$ notation), all directives that consume an argument must do so. like. all of them. no mixing. periodt.

๐ŸŒˆ The escape sequences are: ๐ŸŒˆ

  • `\\` โ€” backslash
  • `\a` โ€” alert (BEL)
  • `\b` โ€” backspace (BS)
  • `\f` โ€” form feed (FF)
  • `\n` โ€” new line (LF)
  • `\r` โ€” carriage return (CR)
  • `\t` โ€” horizontal tab (HT)
  • `\v` โ€” vertical tab (VT)
  • `\nnn` โ€” octal number with 1 to 3 octal digits

๐Ÿฆ‹ Environment variables: ๐Ÿฆ‹

The translation of the format string is looked up in the translation domain given by the environment variable TEXTDOMAIN. It is looked up in the catalogs directory given by the environment variable TEXTDOMAINDIR or, if not present, in the default catalogs directory. This binary is configured to use the default catalogs directory: /usr/share/locale ๐Ÿ‘‘


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Written by Bruno Haible. (the way thatโ€ฆ a legend fr fr ๐Ÿ’–)


๐Ÿ˜ญ REPORTING BUGS ๐Ÿ˜ญ

Report bugs in the bug tracker at <https://savannah.gnu.org/projects/gettext> or by email to <bug-gettext@gnu.org>. please do, they wanna know ๐Ÿซถ


Copyright ยฉ 2025-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. (say it louder for the people in the back)

๐ŸŒŸ SEE ALSO ๐ŸŒŸ

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

info printf_gettext

should give you access to the complete manual. go read it bestie, it's giving main character energy ๐Ÿ“šโœจ


and that's the whole page!! ๐ŸŽ€ this was GNU gettext-runtime 1.0, dated January 2026 โ€” mwah, love u, bye ๐Ÿ’–๐Ÿฆ‹๐ŸŒธ

๐Ÿ“ฆ where this page comes from