Hi.
argp tries to localise strings from its source (like "Usage:" or "Give
a short usage message") using default text domain, which fails (unless
program copies translations from libc po files to its own). It is
demonstrated by the following program:
#v+
% cat argptest.c
#include <argp.h>
#include <locale.h>
#include <libintl.h>
struct argp argp;
int main (int argc, char * argv[])
{
setlocale (LC_ALL, "");
argp_parse (&argp, argc, argv, 0, NULL, NULL);
return 0;
}
% ./argptest --help
Usage: argptest [OPTION...]
-?, --help Give this help list
--usage Give a short usage message
#v-
Adding textdomain("libc") call before argp_parse() changes output to:
#v+
% ./argptest --help
Składnia: argptest [OPCJA...]
-?, --help Wyświetlenie tego tekstu pomocy
--usage Wyświetlenie krótkiej informacji o składni
polecenia
#v-
Setting argp.argp_domain = "libc" doesn't help, messages are
untranslated.
Jarek Kamiński.