MacOS – How to set the region in Terminal

macosplistsystem-prefsterminal

I want to change the Region via Terminal.
How can I do this ?

Ideally it would use a command (/usr/bin or sbin) or modify a plist (plistbuddy).

I'd love to avoid using osascript (AppleScript)
enter image description here

Best Answer

The region is stored in ~/Library/Preferences/.GlobalPreferences, as the second part of the AppleLocale variable. Some examples of the AppleLocale variable:

  • en_US system language set to English, region set to US
  • ja_JP system language set to Japanese, region set to Japan
  • en_DE system language set to English, region set to Germany

You can get more info from Apple's Developer Library, which also has links to the ISO 639-2 codes that can be used.