summaryrefslogtreecommitdiff
path: root/src/include/library/gettext.h
blob: 67e6d1e3792dcd8ffe6e9a247562894ecbeb31a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * Replacement gettext library header file. Include this within config.h,
 * like this:
 *
 *   #ifdef ENABLE_NLS
 *   # include "library/gettext.h"
 *   #else
 *   # define _(String) (String)
 *   # define N_(String) (String)
 *   #endif
 *
 * Copyright 2012 Andrew Wood, distributed under the Artistic License 2.0.
 */

#ifndef _LIBRARY_GETTEXT_H
#define _LIBRARY_GETTEXT_H 1

#ifdef HAVE_GETTEXT
# ifdef HAVE_LIBINTL_H
#  include <libintl.h>
# endif
# ifdef HAVE_LOCALE_H
#  include <locale.h>
# endif
# define _(String)	gettext (String)
# define N_(String)	(String)
#else
# define _(String)	minigettext (String)
# define N_(String)	(String)
# define setlocale	minisetlocale
# define bindtextdomain	minibindtextdomain
# define textdomain	minitextdomain
# ifndef LC_ALL
#  define LC_ALL	""
# endif
#endif

#ifdef __cplusplus
extern "C" {
#endif

char *minisetlocale(char *, char *);
char *minibindtextdomain(char *, char *);
char *minitextdomain(char *);
char *minigettext(char *);

#ifdef __cplusplus
}
#endif

#endif /* _LIBRARY_GETTEXT_H */

/* EOF */