summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChoe Hwanjin <choe.hwanjin@gmail.com>2010-12-29 22:38:28 +0900
committerChoe Hwanjin <choe.hwanjin@gmail.com>2010-12-29 22:38:28 +0900
commit1a24fd5cffa003676507173d7e6f01be715ab4bb (patch)
tree8f0a424b906cc3b0182c30c0bfd6d8535b4b8b2e
parentef97f53ccc98bf56009f289e268162046330f955 (diff)
downloadlibhangul-1a24fd5cffa003676507173d7e6f01be715ab4bb.tar.gz
gettext 적용
git-svn-id: http://kldp.net/svn/hangul/libhangul/trunk@251 8f00fcd2-89fc-0310-932e-b01be5b65e01
-rw-r--r--tools/Makefile.am1
-rw-r--r--tools/hangul.c7
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;