summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authormjwybrow <mjwybrow@users.sourceforge.net>2007-02-13 23:33:17 +0000
committermjwybrow <mjwybrow@users.sourceforge.net>2007-02-13 23:33:17 +0000
commit8c3e11095d407e2dbadc2a39c93827ded2728224 (patch)
treee3a91d004310c4ca0593453c29dd0f7cd8d53717 /src/main.cpp
parentremoving forward declaration of a enum - is it valid at all? at least it work... (diff)
downloadinkscape-8c3e11095d407e2dbadc2a39c93827ded2728224.tar.gz
inkscape-8c3e11095d407e2dbadc2a39c93827ded2728224.zip
* 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. (bzr r2376)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 6 insertions, 0 deletions
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");