[dia/dia-0-97] Bug 644488 - Env var DIA_LOCALE_PATH to specify locale file location



commit f5a65294d18c674f0f598cbc1554a5098e893b94
Author: Steffen Macke <sdteffen sdteffen de>
Date:   Sun Mar 13 18:17:51 2011 +0100

    Bug 644488 - Env var DIA_LOCALE_PATH to specify locale file location

 app/app_procs.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/app/app_procs.c b/app/app_procs.c
index 60ec998..9a42ba8 100644
--- a/app/app_procs.c
+++ b/app/app_procs.c
@@ -659,7 +659,14 @@ _setup_textdomains (void)
     g_free (localedir);
   }
 #else
-  bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
+  const gchar *localedir;
+  
+  localedir = g_getenv("DIA_LOCALE_PATH");
+  if(localedir != NULL) {
+    bindtextdomain(GETTEXT_PACKAGE, localedir);
+  } else {
+    bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
+  }
 #endif
 
 #if defined ENABLE_NLS && defined HAVE_BIND_TEXTDOMAIN_CODESET



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]