Skip to content

Instantly share code, notes, and snippets.

@Obbut
Created August 13, 2018 08:42
Show Gist options
  • Save Obbut/a6d6de03d3ca601c9ef93d5338b02941 to your computer and use it in GitHub Desktop.
Save Obbut/a6d6de03d3ca601c9ef93d5338b02941 to your computer and use it in GitHub Desktop.
function setlang() {
if [ -z "$1" ]; then
echo "Sets the language to launch an application in"
echo "Usage: $0 [application name] [language]"
echo "Example: $0 Mail en-US"
return 1
fi
defaults write $(mdls -name kMDItemCFBundleIdentifier -raw /Applications/$1.app) AppleLanguages '("$2")'
echo "From now on, $1 will launch in $2"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment