1 /* localize.h (i18n/l10n) */ 2 /* $OpenLDAP: pkg/ldap/include/ac/localize.h,v 1.7.2.3 2008/02/11 23:26:40 kurt Exp $ */ 3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>. 4 * 5 * Copyright 1998-2008 The OpenLDAP Foundation. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted only as authorized by the OpenLDAP 10 * Public License. 11 * 12 * A copy of this license is available in file LICENSE in the 13 * top-level directory of the distribution or, alternatively, at 14 * <http://www.OpenLDAP.org/license.html>. 15 */ 16 17 #ifndef _AC_LOCALIZE_H 18 #define _AC_LOCALIZE_H 19 20 #ifdef LDAP_LOCALIZE 21 22 # include <locale.h> 23 # include <libintl.h> 24 25 /* enable i18n/l10n */ 26 # define gettext_noop(s) s 27 # define _(s) gettext(s) 28 # define N_(s) gettext_noop(s) 29 # define ldap_pvt_setlocale(c,l) ((void) setlocale(c, l)) 30 # define ldap_pvt_textdomain(d) ((void) textdomain(d)) 31 # define ldap_pvt_bindtextdomain(p,d) ((void) bindtextdomain(p, d)) 32 33 #else 34 35 /* disable i18n/l10n */ 36 # define _(s) s 37 # define N_(s) s 38 # define ldap_pvt_setlocale(c,l) ((void) 0) 39 # define ldap_pvt_textdomain(d) ((void) 0) 40 # define ldap_pvt_bindtextdomain(p,d) ((void) 0) 41 42 #endif 43 44 #endif /* _AC_LOCALIZE_H */ 45