--- src/main.cpp 2012-07-09 07:35:49.000000000 +0200 +++ src/main.cpp 2012-07-16 15:18:37.296875000 +0200 @@ -474,7 +474,8 @@ #ifdef WIN32 /** - * Set up the PATH and PYTHONPATH environment variables on Windows + * Set up the PATH, INKSCAPE_LOCALEDIR and PYTHONPATH environment + * variables on Windows * @param exe Inkscape executable directory in UTF-8 */ static void _win32_set_inkscape_env(gchar const *exe) @@ -525,7 +526,11 @@ } else { printf("python not found\n\n"); }*/ - + + // INKSCAPE_LOCALEDIR is needed by Python/Gettext + gchar *localepath = g_build_filename(exe, PACKAGE_LOCALE_DIR, NULL); + g_setenv("INKSCAPE_LOCALEDIR", localepath, TRUE); + g_free(python); g_free(scripts); g_free(perl); @@ -538,6 +543,8 @@ g_free(new_path); g_free(new_pythonpath); + + g_free(localepath); } #endif --- share/extensions/inkex.py 2012-07-16 15:39:14.828125000 +0200 +++ share/extensions/inkex.py 2012-07-16 15:12:10.406250000 +0200 @@ -36,13 +36,19 @@ from math import * +domain = 'inkscape' if sys.platform.startswith('win'): import locale current_locale, encoding = locale.getdefaultlocale() os.environ['LANG'] = current_locale - gettext= gettext.translation('inkscape', "C:\Program Files\Inkscape\locale", [current_locale], fallback=True) + try: + localdir = os.environ['INKSCAPE_LOCALEDIR']; + #sys.stderr.write(str(localdir) + "\n") + gettext= gettext.translation(domain, localdir, [current_locale], fallback=True) + except KeyError: + gettext= gettext.translation(domain, fallback=True) else: - gettext= gettext.translation('inkscape') + gettext= gettext.translation(domain, fallback=True) _ = gettext.gettext