summaryrefslogtreecommitdiff
path: root/src/core/nls.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/nls.h')
-rw-r--r--src/core/nls.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/nls.h b/src/core/nls.h
index c1ef405..dfa640d 100644
--- a/src/core/nls.h
+++ b/src/core/nls.h
@@ -1,7 +1,21 @@
#ifndef NLS_H
#define NLS_H
+#if ENABLE_NLS
+
+#include <config.h>
#include <libintl.h>
#define _(S) gettext(S)
+#define init_nls() \
+ do{ \
+ bindtextdomain(PACKAGE, LOCALEDIR); \
+ textdomain(PACKAGE); \
+ }while(0);
+
+#else /* ENABLE_NLS */
+
+#define _(S) S
+#define init_nls() (void)0
+#endif /* ENABLE_NLS */
#endif /* NLS_H */