From 1a24fd5cffa003676507173d7e6f01be715ab4bb Mon Sep 17 00:00:00 2001 From: Choe Hwanjin Date: Wed, 29 Dec 2010 22:38:28 +0900 Subject: =?UTF-8?q?gettext=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@251 8f00fcd2-89fc-0310-932e-b01be5b65e01 --- tools/Makefile.am | 1 + 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 #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; -- cgit v1.2.1