0

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?

5

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.

  • 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .