In the GNU gettext utilities manual at:
https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html, there is the suggested function call:
printf (ngettext ("%$2d file removed from directory %$1s",
"%$2d files removed from directory %$1s",
n),
dir, n);
However, both POSIX (
http://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html) and the cross-referenced 'C format strings' (
https://www.gnu.org/software/gettext/manual/html_node/c_002dformat.html#c_002dformat) show that it should be 'n$' rather than '$n' — that is, the correct call should be:
printf (ngettext ("%2$d file removed from directory %1$s",
"%2$d files removed from directory %1$s",
n),
dir, n);