How can I have spell check for one language *but NOT* for another in El Capitain?
The following script will set the spelling language to ONLY Korean and open a TextEdit window.

#!/bin/sh
PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin export PATH

CommandD()
{
osascript &lt;&lt;EndOfMyScript
tell application "System Events"
keystroke "d" using [command down, option down]
end tell
EndOfMyScript
}



currentDockHiddenState=$(defaults read com.apple.Dock autohide)
if [[ "$currentDockHiddenState" != "1" ]]; then
    CommandD
fi

# Disable text auto-replacement
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSAutomaticCapitalizationEnabled -bool false
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSAutomaticDashSubstitutionEnabled -bool false
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSAutomaticPeriodSubstitutionEnabled -bool false
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSAutomaticSpellingCorrectionEnabled -bool false
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSAutomaticTextCompletionEnabled -bool false
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSSpellCheckerAutomaticallyIdentifiesLanguages -bool false
defaults write ~/Library/Preferences/.GlobalPreferences.plist WebAutomaticSpellingCorrectionEnabled -bool false
defaults delete ~/Library/Preferences/.GlobalPreferences.plist NSUserDictionaryReplacementItems
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSUserDictionaryReplacementItems -array
defaults delete ~/Library/Preferences/.GlobalPreferences.plist AppleLanguages
defaults write ~/Library/Preferences/.GlobalPreferences.plist AppleLanguages -array-add "en" "ko"
defaults delete ~/Library/Preferences/.GlobalPreferences.plist NSLinguisticDataAssetsRequested
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSLinguisticDataAssetsRequested -array-add "en" "en_US" "ko"
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSPreferredSpellServerLanguage "ko"
defaults delete ~/Library/Preferences/.GlobalPreferences.plist NSPreferredSpellServerVendors
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSPreferredSpellServerVendors -dict "ko" -string "Apple"
defaults delete ~/Library/Preferences/.GlobalPreferences.plist NSPreferredSpellServers
defaults write ~/Library/Preferences/.GlobalPreferences.plist NSPreferredSpellServers -array-add "ko" "Apple"

osascript -e 'tell application "Finder"' -e 'set rrr to get bounds of window of desktop' -e 'end tell' -e 'tell application "TextEdit"' -e 'activate' -e 'set bounds of window 1 to rrr' -e 'end tell'