{
vim_setenv((char_u *)"VIMRUNTIME", p);
didset_vimruntime = TRUE;
-#ifdef FEAT_GETTEXT
- {
- char_u *buf = concat_str(p, (char_u *)"/lang");
-
- if (buf != NULL)
- {
- bindtextdomain(VIMPACKAGE, (char *)buf);
- vim_free(buf);
- }
- }
-#endif
}
else
{
putenv((char *)envbuf);
}
#endif
+#ifdef FEAT_GETTEXT
+ /*
+ * When setting $VIMRUNTIME adjust the directory to find message
+ * translations to $VIMRUNTIME/lang.
+ */
+ if (*val != NUL && STRICMP(name, "VIMRUNTIME") == 0)
+ {
+ char_u *buf = concat_str(val, (char_u *)"/lang");
+
+ if (buf != NULL)
+ {
+ bindtextdomain(VIMPACKAGE, (char *)buf);
+ vim_free(buf);
+ }
+ }
+#endif
}
#if defined(FEAT_CMDL_COMPL) || defined(PROTO)