Code

* src/main.cpp: Allow the user to override the locale directory by
authormjwybrow <mjwybrow@users.sourceforge.net>
Tue, 13 Feb 2007 23:33:17 +0000 (23:33 +0000)
committermjwybrow <mjwybrow@users.sourceforge.net>
Tue, 13 Feb 2007 23:33:17 +0000 (23:33 +0000)
    setting the environment variable INKSCAPE_LOCALEDIR. This is required
    for OS X where the install location is not known at compile time and
    relative paths can'r be used.  Fixes bug #1641705 and possibly some
    others.

src/main.cpp

index e8f75c75666cf16a09eaa44aaec72829f03f9268..c62bed422fc38a7dd75a5275caab1e0678619918 100644 (file)
@@ -396,6 +396,12 @@ main(int argc, char **argv)
     bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
 #endif
 #endif
+    // Allow the user to override the locale directory by setting 
+    // the environment variable INKSCAPE_LOCALEDIR.
+    char *inkscape_localedir = getenv("INKSCAPE_LOCALEDIR");
+    if (inkscape_localedir != NULL) {
+        bindtextdomain(GETTEXT_PACKAGE, inkscape_localedir);
+    }
 #endif
 
     bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");