Posted on 01-15-2016 03:47 AM
Hi
I created a OS X vanilla image with the AutoDMG tool on a mac with user and system language in german. Then I copied the image on a MacBook and run the setup assistant to create an admin user and enroll the device with DEP. I selected german as language during the setup assistant . After the setup assistant the user language on the admin is german. Everything good so far.
I have a policy to create some user. These users now have english as user language. Anybody an idea why this happened? Or how do I change the user language with a command for specific users? I know that the language setup is in
~/Library/Preferences/.GlobalPreferences.plist
Thanks!
Best
Posted on 01-15-2016 06:16 AM
there are two things:
-there is languagesetup, which will run at a normal install, and I guess it saves its data in
/Library/Preferences/.GolbalPreferences.plist.
(or in the Library folder of the root user, as written on macenterprise link below)
AutoDMG does not run this tool, so this file is not there, so english is default.
I think you can do two things: edit these files, or make a script to run languagesetup again.
See these links, I think they will solve your issue (if I understand you correctly)
macenterprise group
read the post from Rolf Kocherhans on 28-10-14:
Hello all problem solved ! It has nothing to do with AutoDMG or some other imaging procedure, Apple must have changed something in the way they make the images. The default values (for language and keyboard layout) are stored in the .GlobalPreferences plist of the root user ! The solution is: 1. make the vanilla created by AutoDMG or any other procedure writable 2. execute this two default writes sudo defaults write /Volumes/Macintosh HD/var/root/Library/Preferences/.GlobalPreferences AppleLanguages "(de, en)" sudo defaults write /Volumes/Macintosh HD/var/root/Library/Preferences/.GlobalPreferences AppleLocale -string de_CH 3. make the vanilla read only compressed again 4. renew the checksum (asr imagescan) done !
Posted on 10-25-2018 01:39 PM
Hello - I solved the same Problem with mojave.
Step 1-4 is because of a bug in macOS installer
modify "/Volumes/Macintosh HD 1/private/var/root/Library/Preferences/.GlobalPreferences.plist"
NOT with "defaults write" but with vo or another editor because its an XML File
Here's my file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppleKeyboardUIMode</key>
<integer>3</integer>
<key>AppleLocale</key>
<string>de_DE</string>
</dict>
</plist>
Modify /Library/Preferences/.GlobalPreferences.plist
defaults write "/Volumes/Macintosh HD 1/Library/Preferences/.GlobalPreferences.plist" AppleLanguages "(de, en)"
Posted on 10-25-2018 04:45 PM
I have used previously in a setup script:
#!/bin/bash
defaults write /Library/Preferences/.GlobalPreferences.plist AppleLocale "en_NZ"
defaults write /Library/Preferences/.GlobalPreferences.plist Country "NZ"
No idea if it still works as I went to a deployment only model a couple of years ago, but unless Apple has changed something it should, adjust language and country to suit (they do have to match exactly as required so you may need to query a correct machine).