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:
8
w.c
8
w.c
@ -343,12 +343,16 @@ int main(int argc, char **argv)
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
textdomain(PACKAGE);
|
||||
|
||||
#ifndef W_SHOWFROM
|
||||
from = 0;
|
||||
#endif
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
while ((ch = getopt_long(argc, argv, "hlusfVo", longopts, NULL)) != -1)
|
||||
while ((ch =
|
||||
getopt_long(argc, argv, "hlusfV", longopts, NULL)) != -1)
|
||||
switch (ch) {
|
||||
case 'h':
|
||||
header = 0;
|
||||
|
Reference in New Issue
Block a user