]> code.citadel.org Git - citadel.git/blobdiff - webcit/webserver.c
* Mercilessly ripped out all of the gratuitously complex GNU libintl
[citadel.git] / webcit / webserver.c
index 092236442b6eb6365e6e397e89af784346c22d93..04ac7c3a3872604583c42fcb6a54e6710c767fb5 100644 (file)
@@ -382,14 +382,10 @@ int main(int argc, char **argv)
        char tracefile[PATH_MAX];
        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 *locale = NULL;
+       char *mo = NULL;
+#endif /* ENABLE_NLS */
 
        /* Parse command line */
 #ifdef HAVE_OPENSSL
@@ -465,6 +461,30 @@ int main(int argc, char **argv)
                perror("chdir");
        }
 
+       /* initialize the International Bright Young Thing */
+#ifdef ENABLE_NLS
+
+       initialize_locales();
+
+       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")
+       );
+       lprintf(9, "Text domain Charset: %s\n",
+                       bind_textdomain_codeset("webcit","UTF8")
+       );
+#endif
+
+       initialize_viewdefs();
+       initialize_axdefs();
+
        /*
         * Set up a place to put thread-specific data.
         * We only need a single pointer per thread - it points to the