nls: add functions which take translations to be used

Add the following three functions to most of the commands.

setlocale (LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);

Reference: http://www.freelists.org/post/procps/backporting,1
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola
2011-12-07 13:27:21 +01:00
parent b40353c91e
commit c862a4caa5
11 changed files with 45 additions and 4 deletions

4
pwdx.c
View File

@ -48,6 +48,10 @@ int main(int argc, char *argv[])
{NULL, 0, 0, 0}
};
setlocale (LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
while ((ch = getopt_long(argc, argv, "Vh", longopts, NULL)) != -1)
switch (ch) {
case 'V':