diff options
-rw-r--r-- | tools/Makefile.am | 1 | ||||
-rw-r--r-- | tools/hangul.c | 7 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index ea26175..3a50d0c 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -2,4 +2,5 @@ bin_PROGRAMS = hangul hangul_SOURCES = hangul.c +hangul_CFLAGS = -DLOCALEDIR=\"$(localedir)\" hangul_LDADD = ../hangul/libhangul.la diff --git a/tools/hangul.c b/tools/hangul.c index 699ec28..9fe6bf3 100644 --- a/tools/hangul.c +++ b/tools/hangul.c @@ -14,8 +14,7 @@ #include <iconv.h> #include "../hangul/hangul.h" - -#define _(x) (x) +#include "../hangul/hangul-gettext.h" #ifdef WORDS_BIGENDIAN #define UCS4 "UCS-4BE" @@ -260,6 +259,10 @@ main(int argc, char *argv[]) HangulInputContext* ic; bool strict_order = false; +#ifdef ENABLE_NLS + bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); +#endif + setlocale(LC_ALL, ""); res = EXIT_SUCCESS; |