pgettext
Bruno Haible
bruno@clisp.org
Tue May 27 20:29:30 GMT 2025
Vivien Kraus wrote:
> as far as I understand, pgettext is not available in libintl.
>
> + /* FIXME: use pgettext instead of gettext. */
It would be good to add pgettext() and friends to glibc. It's on my
long-term TODO list to move their declarations to an LGPLed .h file.
That .h file may be <libintl.h>, if it's done in sync with glibc.
Otherwise, it would be called something like <libintlx.h> or
<libintlx/context.h>.
So, for the topic of getopt(), please do NOT assume that pgettext
will never be in glibc. Instead, think about how the programmer could
provide the 'context' argument that pgettext() needs, or whether this
'context' argument should be a fixed constant literal.
Bruno
More information about the Libc-alpha
mailing list