Relocate the locale directory.
[pspp-builds.git] / src / libpspp / i18n.c
index fb3973f437bb737d0ba53011596da1f844588509..7fd7580e89d0d12fff978dbb35c6b95981758a00 100644 (file)
@@ -24,6 +24,7 @@
 #include <libintl.h>
 #include <iconv.h>
 #include <errno.h>
+#include <relocatable.h>
 #include "assertion.h"
 #include "hmapx.h"
 #include "hash-functions.h"
@@ -68,7 +69,7 @@ create_iconv (const char* tocode, const char* fromcode)
   converter->fromcode = xstrdup (fromcode);
   converter->conv = iconv_open (tocode, fromcode);
   hmapx_insert (&map, converter, hash);
-  
+
   /* I don't think it's safe to translate this string or to use messaging
      as the convertors have not yet been set up */
   if ( (iconv_t) -1 == converter->conv && 0 != strcmp (tocode, fromcode))
@@ -196,7 +197,7 @@ i18n_init (void)
 #if HAVE_LC_PAPER
   setlocale (LC_PAPER, "");
 #endif
-  bindtextdomain (PACKAGE, locale_dir);
+  bindtextdomain (PACKAGE, relocate(locale_dir));
   textdomain (PACKAGE);
 #endif /* ENABLE_NLS */