summaryrefslogtreecommitdiff
path: root/server/util
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-06-15 10:54:09 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-06-17 07:23:24 -0400
commitad4e495fa434f72de37846704cb08bacac3c52da (patch)
treee2327aca6935c1e3bc726b880a70a4e666bab667 /server/util
parent7d2f248b39aa78eaa7708ce64ad146d5a8bb934c (diff)
downloadsssd-ad4e495fa434f72de37846704cb08bacac3c52da.tar.gz
sssd-ad4e495fa434f72de37846704cb08bacac3c52da.tar.bz2
sssd-ad4e495fa434f72de37846704cb08bacac3c52da.zip
Create gettext framework for SSSD daemon
Diffstat (limited to 'server/util')
-rw-r--r--server/util/server.c6
-rw-r--r--server/util/sssd-i18n.h8
2 files changed, 14 insertions, 0 deletions
diff --git a/server/util/server.c b/server/util/server.c
index 7c1c927f..4dfd18ef 100644
--- a/server/util/server.c
+++ b/server/util/server.c
@@ -29,6 +29,7 @@
#include <fcntl.h>
#include <unistd.h>
#include "util/util.h"
+#include "util/sssd-i18n.h"
#include "ldb.h"
#include "confdb/confdb.h"
@@ -280,6 +281,11 @@ int server_setup(const char *name, int flags,
}
}
+ /* Set up locale */
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
/* the event context is the top level structure.
* Everything else should hang off that */
event_ctx = tevent_context_init(talloc_autofree_context());
diff --git a/server/util/sssd-i18n.h b/server/util/sssd-i18n.h
new file mode 100644
index 00000000..74f9bec0
--- /dev/null
+++ b/server/util/sssd-i18n.h
@@ -0,0 +1,8 @@
+#ifndef _SSSD_I18N_H
+#define _SSSD_I18N_H
+
+#include <libintl.h>
+#define _(STRING) gettext (STRING)
+#include "config.h"
+
+#endif