diff options
author | Choe Hwanjin <choe.hwanjin@gmail.com> | 2010-12-29 22:38:28 +0900 |
---|---|---|
committer | Choe Hwanjin <choe.hwanjin@gmail.com> | 2010-12-29 22:38:28 +0900 |
commit | 1a24fd5cffa003676507173d7e6f01be715ab4bb (patch) | |
tree | 8f0a424b906cc3b0182c30c0bfd6d8535b4b8b2e | |
parent | ef97f53ccc98bf56009f289e268162046330f955 (diff) | |
download | libhangul-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.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; |