Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know the common sudo languagesetup to set the system language. Does someone know how to get the system language or the language that was selected when Mac OS X was installed?

share|improve this question
up vote 3 down vote accepted

The left part of osascript -e 'user locale of (get system info)' is the language selected in Setup Assistant (I think).

The language at the top of the list in the Language & Text preferences should be the second line of defaults read -g AppleLanguages.

share|improve this answer
osascript -e 'user locale of (get system info)' is returning the locale as same as following code gives NSLocale *locale; locale = [NSLocale currentLocale]; NSLog(@"Current locale Identifier %@",[locale localeIdentifier]); This is the system language for the currently logged in user right?not the default system language. – Akbar Jun 11 '12 at 7:28
@Akbar is correct: add a language in the prefpane, make it go at the top, run the osascript command and witness the change. – Lloeki Aug 18 '15 at 7:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.