Commit 4809e4da authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Basic infrastructure for i18n/l10n

parent 1bae6d28
......@@ -50,6 +50,7 @@ ldap_config.h: $(LDAP_CONFIG) Makefile
sbindir=$(sbindir); \
libexecdir=$(libexecdir); \
localstatedir=$(localstatedir); \
localedir=$(localedir); \
fi; \
$(SED) \
-e "s;%SYSCONFDIR%;$$sysconfdir;" \
......@@ -58,6 +59,7 @@ ldap_config.h: $(LDAP_CONFIG) Makefile
-e "s;%SBINDIR%;$$sbindir;" \
-e "s;%LIBEXECDIR%;$$libexecdir;" \
-e "s;%RUNDIR%;$$localstatedir;" \
-e "s;%LOCALEDIR%;$$localedir;" \
$(LDAP_CONFIG) >> $@; \
$(CHMOD) 444 $@
......
/* localize.h (i18n/l10n) */
/* $OpenLDAP$ */
/*
* Copyright 2003 The OpenLDAP Foundation, Redwood City, California, USA
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted only as authorized by the OpenLDAP
* Public License. A copy of this license is available at
* http://www.OpenLDAP.org/license.html or in file LICENSE in the
* top-level directory of the distribution.
*/
#ifndef _AC_LOCALIZE_H
#define _AC_LOCALIZE_H
#ifdef LDAP_LOCALIZE
# include <locale.h>
# include <libintl.h>
/* enable i18n/l10n */
# define gettext_noop(s) s
# define _(s) gettext(s)
# define N_(s) gettext_noop(s)
#else
/* disable i18n/l10n */
# define setlocale(c,l) /* empty */
# define _(s) s
# define N_(s) s
# define textdomain(d) /* empty */
# define bindtextdomain(p,d) /* empty */
#endif
#endif /* _AC_LOCALIZE_H */
......@@ -59,5 +59,9 @@
#ifndef LDAP_RUNDIR
#define LDAP_RUNDIR "%RUNDIR%"
#endif
#ifndef LDAP_LOCALEDIR
#define LDAP_LOCALEDIR "%LOCALEDIR%"
#endif
#endif /* _LDAP_CONFIG_H */
......@@ -1077,5 +1077,6 @@
#include "ldap_features.h"
#include "ac/assert.h"
#include "ac/localize.h"
#endif /* _LDAP_PORTABLE_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment