Temporarily change system language via AppleScript

Jan 03, '07 07:30:00AM

Contributed by: yasny_jp

I run my Mac with Japanese set as the default langauge. However, sometimes I want to run programs in English, and it was always a pain to go to System Preferences -> International and change the language. I know I can also deselect Japanese from the Language section on the Get Info window for each program, but then I would have to turn it back on later. I discovered a way to change the language from the Terminal that makes things a lot easier.

When I'm in Japanese mode and I want to switch to English, I run the following command:

defaults write NSGlobalDomain AppleLanguages 
 "(en, ja, fr, de, es, it, nl, sv, nb, da, fi, pt, zh-Hans, zh-Hant, ko)"
Once that is run, any program that you launch will run in English. To switch back, just swap the two languages you want, like so:
defaults write NSGlobalDomain AppleLanguages 
 "(ja, en, fr, de, es, it, nl, sv, nb, da, fi, pt, zh-Hans, zh-Hant, ko)"
Using this basic idea, one can temporarily switch into whatever language they want and not have to hassle with System Preferences. I wrote a simple AppleScript droplet that I can drop applications onto, and they will run in English. I'm sure the code could be simplified, but it gets the job done in its current form.

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20061229203902170