diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2009-06-15 10:54:09 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-06-17 07:23:24 -0400 |
commit | ad4e495fa434f72de37846704cb08bacac3c52da (patch) | |
tree | e2327aca6935c1e3bc726b880a70a4e666bab667 /server/util | |
parent | 7d2f248b39aa78eaa7708ce64ad146d5a8bb934c (diff) | |
download | sssd-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.c | 6 | ||||
-rw-r--r-- | server/util/sssd-i18n.h | 8 |
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 |