* Assorted tweaks to activate the translations...
[citadel.git] / webcit / webserver.c
index 092236442b6eb6365e6e397e89af784346c22d93..91a1dfa5ce0754483f44a6bc501203e96ab753c0 100644 (file)
@@ -383,13 +383,7 @@ int main(int argc, char **argv)
        char ip_addr[256];
        char *webcitdir = WEBCITDIR;
        char *locale = NULL;
-
-       /* initialize the International Bright Young Thing */
-#ifdef ENABLE_NLS
-       locale = setlocale(LC_ALL, "");
-       bindtextdomain(PACKAGE, LOCALEDIR);
-       textdomain(PACKAGE);
-#endif
+       char *mo = NULL;
 
        /* Parse command line */
 #ifdef HAVE_OPENSSL
@@ -465,6 +459,21 @@ int main(int argc, char **argv)
                perror("chdir");
        }
 
+       /* initialize the International Bright Young Thing */
+#ifdef ENABLE_NLS
+       locale = setlocale(LC_ALL, "");
+
+       mo = malloc(strlen(webcitdir) + 20);
+       sprintf(mo, "%s/locale", webcitdir);
+       lprintf(9, "Message catalog directory: %s\n",
+               bindtextdomain("webcit", mo)
+       );
+       free(mo);
+       lprintf(9, "Text domain: %s\n",
+               textdomain("webcit")
+       );
+#endif
+
        /*
         * Set up a place to put thread-specific data.
         * We only need a single pointer per thread - it points to the