Fixed locale support
authorshort <>
Thu, 1 May 2003 13:19:56 +0000 (13:19 +0000)
committershort <>
Thu, 1 May 2003 13:19:56 +0000 (13:19 +0000)
src/client/cmdline/cmd_help.c
src/client/cmdline/main.c

index f56d334..92b57d4 100644 (file)
@@ -58,5 +58,5 @@ int cmd_name_maxlen;
        for (commandp=cmdline_command_table+1;commandp->name;commandp++)
                cmd_name_maxlen=MAX(cmd_name_maxlen,(int)strlen(commandp->name));
        for (commandp=cmdline_command_table+1;commandp->name;commandp++)
-               printf("%-*s\t%s\n",cmd_name_maxlen,commandp->name,commandp->description);
+               printf("%-*s\t%s\n",cmd_name_maxlen,commandp->name,_(commandp->description));
 }
index 213d3c8..cdd94b3 100644 (file)
@@ -26,6 +26,7 @@
 #include <popt.h>
 #include <string.h>
 #include <stdio.h>
+#include <locale.h>
 
 #include <captive/client.h>    /* for captive_init() */
 
@@ -199,6 +200,11 @@ int cmd_argc;
 GError *gerr=NULL;
 const char *cmd_cd_root_args[]={"/",NULL};
 
+       /* Initialize the i18n stuff */
+       setlocale(LC_ALL,"");
+       bindtextdomain(PACKAGE,LOCALEDIR);
+       textdomain(PACKAGE);
+
        context=poptGetContext(
                        PACKAGE,        /* name */
                        argc,(/*en-const*/const char **)argv,   /* argc,argv */