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