Skip to content
Browse files

.osx: Set language and text formats

  • Loading branch information...
1 parent df434ef commit 24045d9f06b06a1d25dbd7f6ebc52f6b16d9db1b @mathiasbynens committed Jun 26, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 .osx
View
8 .osx
@@ -46,6 +46,14 @@ defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Set a blazingly fast keyboard repeat rate
defaults write NSGlobalDomain KeyRepeat -int 0
+# Set language and text formats
+# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with `Inches`, and `true` with `false`.
+defaults write NSGlobalDomain AppleLanguages -array "en" "nl"
+defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR"
@oschrenk
oschrenk added a note Jun 27, 2012

I'm using sudo defaults write /Library/Preferences/.GlobalPreferences AppleLocale "de_DE"

Aside from the language itself, does this command do anything else? I mainly set mine as the login screen defaults to 12h clock format when not set to to german locale.

@mathiasbynens
Owner

This command simply automates my settings in System Preferences → Language & Text → Format. Not sure what exactly that setting does and does not do, to be honest.

@oschrenk
oschrenk added a note Jun 27, 2012

I see. Do you know if defaults write /Library/Preferences/.GlobalPreferences references the same as defaults write NSGlobalDomain AppleLocale?

@mathiasbynens
Owner

Easy enough to test:

cd /tmp; defaults read /Library/Preferences/.GlobalPreferences > a; defaults read NSGlobalDomain > b; diff a b

defaults write /Library/Preferences/.GlobalPreferences is not the same as defaults write NSGlobalDomain (which is equivalent to defaults write -g).

@oschrenk
oschrenk added a note Jun 28, 2012

Thanks for the clarification

@sindresorhus
sindresorhus added a note Jun 28, 2012

@mathiasbynens Tip, you can use this to skip the temp files:

diff <(defaults read /Library/Preferences/.GlobalPreferences) <(defaults read NSGlobalDomain)

Use -y to get side-by-side and colordiff to get colors ;)

@mathiasbynens
Owner

@sindresorhus Now that’s useful. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+AppleMeasurementUnits
+defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters"
+defaults write NSGlobalDomain AppleMetricUnits -bool true
+
# Disable auto-correct
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false

0 comments on commit 24045d9

Please sign in to comment.
Something went wrong with that request. Please try again.