$Log$
+Revision 621.9 2005/08/17 03:43:20 ajc
+* More work to get the gettext stuff working, although I really don't
+ know what I'm doing here
+
Revision 621.8 2005/08/16 20:51:08 ajc
* More gettext/i18n crap
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
$(LIBOBJS) $(LIBS) $(LDFLAGS) -o webserver
.c.o:
- $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(prefix)\" $<
+ $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(prefix)\" -DLOCALEDIR=\"$(prefix)/locale\" $<
Makefile: $(srcdir)/Makefile.in config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
#include <iconv.h>
#endif
+#include "gettext.h"
-#ifdef ENABLE_NLS
-#ifdef HAVE_LIBINTL_H
-#include <libintl.h>
-#endif
-#define _(string) gettext(string)
-#define P_(singular, plural, number) ngettext(singular, plural, number)
+#if ENABLE_NLS
+#include <locale.h>
+#define _(string) gettext(string)
#else
-#define _(string) (string)
-#define P_(singular, plural, number) (number == 1 ? singular : plural)
+#define _(string) (string)
#endif
-#define gettext_noop(string) (string)
-#define N_(string) gettext_noop(string)
- /* Mark a string that will be sent to gettext() later. */
-
/*
* Uncomment to dump an HTTP trace to stderr
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
/* Parse command line */
#ifdef HAVE_OPENSSL