Created
August 13, 2018 08:42
-
-
Save Obbut/a6d6de03d3ca601c9ef93d5338b02941 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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