2 * Copyright (C) 1998, 2001 Free Software Foundation, Inc.
4 * This file is free software; as a special exception the author gives
5 * unlimited permission to copy and/or distribute it, with or without
6 * modifications, as long as this notice is preserved.
8 * This file is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even
10 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 #ifndef GNUPG_COMMON_I18N_H
15 #define GNUPG_COMMON_I18N_H
18 #ifdef USE_SIMPLE_GETTEXT
19 # include "../common/w32help.h"
20 # define _(a) gettext (a)
28 # define _(a) gettext (a)
30 # define N_(a) gettext_noop (a)
37 # define ngettext(a,b,c) ((c)==1? (a):(b))
39 #endif /*!USE_SIMPLE_GETTEXT*/
41 #ifndef GNUPG_GCC_ATTR_FORMAT_ARG
42 #if __GNUC__ >= 3 /* Actually 2.8 but testing the major is easier. */
43 # define GNUPG_GCC_ATTR_FORMAT_ARG(a) __attribute__ ((__format_arg__ (a)))
45 # define GNUPG_GCC_ATTR_FORMAT_ARG(a)
49 void i18n_init (void);
50 char *i18n_switchto_utf8 (void);
51 void i18n_switchback (char *saved_codeset);
52 const char *i18n_utf8 (const char *string);
53 const char *i18n_localegettext (const char *lc_messages, const char *string)
54 GNUPG_GCC_ATTR_FORMAT_ARG(2);
56 /* If a module wants a local L_() function we define it here. */
57 #ifdef LunderscoreIMPL
63 #endif /*GNUPG_COMMON_I18N_H*/