diff options
Diffstat (limited to '')
-rw-r--r-- | src/i18n.h | 15 | ||||
-rw-r--r-- | src/main.c | 4 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/i18n.h b/src/i18n.h index 64484834a..dd0ae85ae 100644 --- a/src/i18n.h +++ b/src/i18n.h @@ -21,13 +21,18 @@ #include "config.h" -/* i18n */ -#if defined(HAVE_LOCALE_H) && !defined(NCMPC_MINI) -#include <locale.h> -#endif #ifdef ENABLE_NLS + #include <libintl.h> -#include <glib/gi18n.h> + +#define _(x) gettext(x) + +#ifdef gettext_noop +#define N_(x) gettext_noop(x) +#else +#define N_(x) (x) +#endif + #else #define _(x) x #define N_(x) x diff --git a/src/main.c b/src/main.c index 67901371e..53ea8c592 100644 --- a/src/main.c +++ b/src/main.c @@ -45,6 +45,10 @@ #include <signal.h> #include <string.h> +#ifdef HAVE_LOCALE_H +#include <locale.h> +#endif + /* time between mpd updates [s] */ static const guint update_interval = 500; |