Remove compiled-in pathname LOCALE_DIR by relocatable runtime function

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15133 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2006-11-24 13:50:41 +00:00
parent 462cebb82f
commit 7852857000

View File

@ -50,6 +50,7 @@
#include "gnc-engine.h"
#include "gnc-filepath-utils.h"
#include "gnc-path.h"
#include "io-gncxml.h"
#include "io-gncxml-v2.h"
@ -1051,10 +1052,16 @@ g_module_check_init(GModule *module)
{
QofBackendProvider *prov;
#ifdef ENABLE_NLS
gchar *localedir = gnc_path_get_localedir ();
/* FIXME: It is unclear whether setlocale() is actually
needed here (added in r11313). Some platforms might
need it so that gettext works correctly in this
GModule. We'll keep it for now. */
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
bindtextdomain (GETTEXT_PACKAGE, localedir);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
g_free (localedir);
#endif
prov = g_new0 (QofBackendProvider, 1);
prov->provider_name = "GnuCash File Backend Version 2";