From 60bfa7e2e086c7fa95a93033ce64b4a39e026581 Mon Sep 17 00:00:00 2001 From: mjwybrow Date: Tue, 13 Feb 2007 23:33:17 +0000 Subject: [PATCH] * src/main.cpp: Allow the user to override the locale directory by 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index e8f75c756..c62bed422 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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"); -- 2.30.2