System and User Language

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 10-25-2018 01:39 PM
Hello - I solved the same Problem with mojave.
- Copy "Install macOS Mojave.app" to a new folder
- Make an image from previous folder
- Mount the DMG
- Start AutoDMG and drop the installer fom the DMG to it
Step 1-4 is because of a bug in macOS installer
- Mount the image read/write with the shadow option hdiutil attach osx-10.14-18A391.apfs.dmg -shadow osx.shadow Mountpoint is "/Volumes/Macintosh HD 1" Make necessary changes
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)"- Convert the DMG back to read only embedding the changes from the shadow file. hdiutil convert osx-10.14-18A391.apfs.dmg -format UDRW -o new.dmg -shadow osx.shadow
- Create the VM using vfuse (I use a teplate to crate it). vfuse -t vfuse-template10-14.json Here's my template: { "source_dmg": "/Users/user/Jamf/Jamf/new.dmg", "output_dir": "/Users/user/Jamf/vms", "output_name": "macos-10-14-jamf", "cache": false, "hw_version": 12, "mem_size": 4096, "disk_type": 0, "bridged": false, "mac_address": "", "enable3d": true, "vnc_port": 5901, "vnc_passwd": "", "hw_model": "MacBookAir7,2", "serial_number": "XXXXXXXXXXXX", "snapshot": true, "snapshot_name": "base-snapshot", "shared_folder": "/Users/user/Documents", "packer_template": "" }
- macOS Installer comes in german.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
