I faced this problem when installed Inkscape (GNU GPL licensed SVG editor) with multiple language packs. Once I started the Inkscape for the first time, I got the UI in German language. Not nice, I wanted it in English. So, I started to look where can I switch the language, and surprisingly I didn’t find this option. Also there appeared to be no command-line switch for it. Brief search through the Web revealed, that the Inkscape shows its UI in default system locale (which is German in my case), unless locale is overridden by the LANG environment variable. Tested from the command line – worked like a charm. So far so good, but I don’t like to start Inkscape from the command line each time.
Of course, the immediate solution is to create a batch script, and start it via the shortcut. Separate batch script for that simple thing? Hmm…
Another possibility would be to set the environment variable for my entire user account using standard windows dialog. But this is not flexible, since other programs may also react on LANG variable.
So, here is my final recipie, how to do it for a single program via the Windows shortcut without a separate batch script (on the example of Inkscape):
1. Create a new shortcut, enter the following command line:
C:\Windows\System32\cmd.exe /c “SET LANG=en && START /D ^”C:\Program Files (x86)\Inkscape^” inkscape.exe”
Drill-down:
Code fragment
Explanation
C:\Windows\System32\cmd.exe
start command line processor
/c
instruct the command processor to execute provided string: “SET … inkscape.exe”
SET LANG=en
set the environment variable, multiple SET commands can be chained using &&
&&
execute another command if preceding SET has exited with the error code 0 (success)
START
start a program in a new window
/D
specify working directory for the program
^”
Just a quotation mark, ^ is an escape character […]