Back to index

openldap  2.4.31
localize.h
Go to the documentation of this file.
00001 /* localize.h (i18n/l10n) */
00002 /* $OpenLDAP$ */
00003 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
00004  *
00005  * Copyright 1998-2012 The OpenLDAP Foundation.
00006  * All rights reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted only as authorized by the OpenLDAP
00010  * Public License.
00011  *
00012  * A copy of this license is available in file LICENSE in the
00013  * top-level directory of the distribution or, alternatively, at
00014  * <http://www.OpenLDAP.org/license.html>.
00015  */
00016 
00017 #ifndef _AC_LOCALIZE_H
00018 #define _AC_LOCALIZE_H
00019 
00020 #ifdef LDAP_LOCALIZE
00021 
00022 #      include <locale.h>
00023 #      include <libintl.h>
00024 
00025        /* enable i18n/l10n */
00026 #      define gettext_noop(s)             s
00027 #      define _(s)                               gettext(s)
00028 #      define N_(s)                       gettext_noop(s)
00029 #      define ldap_pvt_setlocale(c,l)            ((void) setlocale(c, l))
00030 #      define ldap_pvt_textdomain(d)             ((void) textdomain(d))
00031 #      define ldap_pvt_bindtextdomain(p,d)       ((void) bindtextdomain(p, d))
00032 
00033 #else
00034 
00035        /* disable i18n/l10n */
00036 #      define _(s)                               s
00037 #      define N_(s)                       s
00038 #      define ldap_pvt_setlocale(c,l)            ((void) 0)
00039 #      define ldap_pvt_textdomain(d)             ((void) 0)
00040 #      define ldap_pvt_bindtextdomain(p,d)       ((void) 0)
00041 
00042 #endif
00043 
00044 #endif /* _AC_LOCALIZE_H */