summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-07-18 19:52:18 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-07-18 19:52:18 (EDT)
commit6b53901ae1d40940bf2ba9ffcfbd5fc9b61c381c (patch)
tree1050108cbd4d0300e4b31be2e6da070514a0f099
parent28c0b0582844582b33ab345a7f4b95e0fa9856d8 (diff)
main(): Set text domain, locale, etc.
-rw-r--r--src/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index cd7b04a..31134cc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -57,6 +57,15 @@ main(int argc, char **argv)
set_program_name(argv[0]);
+#if defined(ENABLE_NLS) && ENABLE_NLS
+ bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
+#if defined(HAVE_BIND_TEXTDOMAIN_CODESET) && HAVE_BIND_TEXTDOMAIN_CODESET
+ bind_textdomain_codeset(PACKAGE, "UTF-8");
+#endif
+ textdomain(PACKAGE);
+ setlocale(LC_ALL, "");
+#endif
+
font = NULL;
w = 0;
h = 0;