Hi Trondah,
I’d be very interested in seeing your config as well.
– Anders, Denmark
Hi,
I have looked everywhere on the web and looked everywhere in files to find a list of locale IDs in order to change the locale to Danish.
Does anybody know where to get a list or have a list of Locale IDs?
– Anders
I’ll just answer my own question. I didn’t find a list of Locale IDs, but I downloaded Ukelele from [url]scripts.sil.org/ukelele[/url]. By opening the layouts that come with the application it’s possible to see the ID of the layout.
– Anders
Edit–The forum monsters ate your URL inside the less than/greater than signs. Changed it to a regular URL. – Patrick, 2/10/2009
To find the ISO language code of your current system, type this command:
[code]cat /private/var/log/CDIS.custom[/code]
To list all ISO codes supported by the Apple installer, type this command:
[code]installer -listiso[/code]
small addition to the efforts to localise keyboard input etc. after imaging my machines with the steps ^^ up thread, i still found some of my users reverting to US keyboard (“I can’t type a pound sign any more!”)
possibly the users ByHost HIToolbox plist (taken over from logging into a Tiger machine — we have networked home folders) was being found wanting by the Leopard client and getting a default US value
the only place i found remnants of a plist refering to a US layout was in the root preferences:
/private/var/root/Library/Preferences/ByHost/com.apple.HIToolbox.[byhostkeystuffhere].plist
so i edited that (PlistBuddy) to set it to UK (with much the same commands as in the the steps up thread) and that LOOKS like it might be doing the trick. i logged in as a user with no library and it made a default byhost HIToolbox plist that is definitely setting for UK alright.
trouble from the imaging PoV is that the root ByHost plist isn’t IN the image is it. it must be generated at some point from a setting some place else. not sure when either.
hope this helps
[QUOTE][u]Quote by: thomasb[/u][p]To find the ISO language code of your current system, type this command:
[code]cat /private/var/log/CDIS.custom[/code]
To list all ISO codes supported by the Apple installer, type this command:
[code]installer -listiso[/code][/p][/QUOTE]
Unfortunately this isn’t the Locale ID, but the ISO Language code. The locale ID is a number.
– Anders
[QUOTE][u]Quote by: alantrewartha[/u][p]small addition to the efforts to localise keyboard input etc. after imaging my machines with the steps ^^ up thread, i still found some of my users reverting to US keyboard (“I can’t type a pound sign any more!”)
the only place i found remnants of a plist refering to a US layout was in the root preferences:
/private/var/root/Library/Preferences/ByHost/com.apple.HIToolbox.[byhostkeystuffhere].plist
so i edited that (PlistBuddy) to set it to UK (with much the same commands as in the the steps up thread) and that LOOKS like it might be doing the trick. i logged in as a user with no library and it made a default byhost HIToolbox plist that is definitely setting for UK alright.
trouble from the imaging PoV is that the root ByHost plist isn’t IN the image is it. it must be generated at some point from a setting some place else. not sure when either.[/p][/QUOTE]
Same here. We had problems with our keyboard layout randomly reverting to U.S.
I ran fseventer while running the Setup Assistant:
[code]sudo /System/Library/CoreServices/Setup\ Assistant.app/Contents/MacOS/Setup\ Assistant[/code]
The following files were modified when setting the Country and Keyboard Layout in the first two steps of the Setup Assistant:
/private/var/root/Library/Preferences/com.apple.HIToolbox.plist
/private/var/root/Library/Preferences/com.apple.print.PrinteringPrefs.plist
/private/var/root/Library/Preferences/ByHost/com.apple.HIToolbox.{UUID}.plist
/Library/Preferences/com.apple.HIToolbox.plist
/Library/Preferences/.GlobalPreferences.plist
To solve this, I made a shell script launched by a LaunchAgent running over the loginwindow checking the Keyboard Layout in root’s ByHost HIToolbox plist (I set the LimitLoadToSessionType key in the launchagent plist to LoginWindow). If the Keyboard Layout is not set to what I want it to be, it is changed to what I want (I use PlistBuddy to check and fix).
It seems like the Keyboard Layout in the root’s ByHost HIToolbox only is changed on first boot of a newly imaged Mac, because the script has only run once after first boot. I implemented this fix in our image in the end of December 2008, and the keyboard layout has not changed since. The main problem here is that the Setup Assistant is bypassed. That obviously causes some problems, but it seems like the root’s ByHost HIToolbox is the key to making the Keyboard Layout stick.
typofonic: Sorry, but I do not know where all these locale ID’s are stored. To find the Locale ID, I guess you just have set the language for a user account and find the right value in the ~/Library/Preferences/ByHost/com.apple.HIToolbox.{UUID}.plist
Interesting!
Thx for the input, i will look in to it since i haven’t solve this yet either..
p
[i][quote]The following files were modified when setting the Country and Keyboard Layout in the first two steps of the Setup Assistant:
/private/var/root/Library/Preferences/com.apple.HIToolbox.plist
/private/var/root/Library/Preferences/com.apple.print.PrinteringPrefs.plist
/private/var/root/Library/Preferences/ByHost/com.apple.HIToolbox.{UUID}.plist
/Library/Preferences/com.apple.HIToolbox.plist
/Library/Preferences/.GlobalPreferences.plist
[/quote][/i]
excellent work there – thank you. so that’s /Lib/Pref/.GlobalPreferences.plist and com.apple.HIToolbox.plist as listed in my orginal script, and root’s Library/Preferences/ByHost/com.apple.HIToolbox.{UUID}.plist.
The remaining 2 files don’t exist on my images systems (as they stand) – what’s in there after you run that? Just out of interest, what stuff that you can see in a -c “Print” PlistBuddy of those files looks relevant/useful/interesting?
All these files contain information about localization, that is why they are modified/created by the Setup Assistant when selecting a country and keyboard layout.
[code]/usr/libexec/PlistBuddy -c Print /private/var/root/Library/Preferences/com.apple.HIToolbox.plist
Dict {
AppleItlbNumber = Dict {
smRoman = 16383
}
AppleTimeResID = Dict {
smRoman = 12
}
AppleDateResID = Dict {
smRoman = 12
}
AppleNumberResID = Dict {
smRoman = 12
}
AppleItlbDate = Dict {
smRoman = 16383
}
}[/code]
[code]/usr/libexec/PlistBuddy -c Print /private/var/root/Library/Preferences/com.apple.print.PrintingPrefs.plist
Dict {
DefaultPaperID = iso-a4
}[/code]
Sorry. I misspelled the com.apple.print.PrintingPrefs.plist
We have created two packages for our localization. One that installs the files listed above, and one that installs a LaunchAgent and a shell script which fixes the Keyboard Layout in root’s ByHost HIToolbox plist on first boot. Seems to work fine. No issues since we implemented it in late December 2008. No more random switching to U.S. Keyboard Layout.
In addition, we install all localization files into both English.lproj and no.lproj (Norwegian), because the home folders created on first login by ADmitMac are based on the English user template (that’s at least what the documentation from Thursby says). We also change the value of the .CFUserTextEncoding in the English.lproj to the same as the one in no.lproj
I guess checking the .CFUserTextEncoding is an other way of finding the right Locale ID 🙂
thanks for that. the paper setting thing is sort of funny ha ha – in that it makes regionalisation sense 🙂
the /private/var/root/Library/Preferences/com.apple.HIToolbox.plist file is funny peculiar tho. do you enable root in your setup? it’s content is similar to the /Lib/Pref/com.apple.HIToolbox.plist file except its notable that the values are arrays there, eg
[code] AppleTimeResID = Dict {
smRoman = Array {
2
}
}
[/code]
again – cheers for doing that.
Hehe… glad I can contribute.
No, we do not enable root. The Setup Assistant creates/modifies files in the root home folder, as mentioned above. Since we bypass the Setup Assistant, we need to install them and make sure they “stick” to what they are supposed to.
[code]/usr/libexec/PlistBuddy -c Print /Library/Preferences/com.apple.HIToolbox.plist
Dict {
AppleItlbNumber = Dict {
smRoman = 16383
}
AppleEnabledInputSources = Array {
Dict {
InputSourceKind = Keyboard Layout
KeyboardLayout Name = Norwegian
KeyboardLayout ID = 12
}
}
AppleInputSourceHistory = Array {
Dict {
InputSourceKind = Keyboard Layout
KeyboardLayout Name = Norwegian
KeyboardLayout ID = 12
}
}
AppleDefaultAsciiInputSource = Dict {
InputSourceKind = Keyboard Layout
KeyboardLayout Name = Norwegian
KeyboardLayout ID = 12
}
AppleDateResID = Dict {
smRoman = 12
}
AppleTimeResID = Dict {
smRoman = 12
}
AppleSelectedInputSources = Array {
Dict {
InputSourceKind = Keyboard Layout
KeyboardLayout Name = Norwegian
KeyboardLayout ID = 12
}
}
AppleNumberResID = Dict {
smRoman = 12
}
AppleItlbDate = Dict {
smRoman = 16383
}
}[/code]
[code]/usr/libexec/PlistBuddy -c Print /private/var/root/Library/Preferences/ByHost/com.apple.HIToolbox.{UUID}.plist
Dict {
AppleItlbNumber = Dict {
smRoman = 16383
}
AppleEnabledInputSources = Array {
Dict {
InputSourceKind = Keyboard Layout
KeyboardLayout Name = Norwegian
KeyboardLayout ID = 12
}
}
AppleInputSourceHistory = Array {
Dict {
InputSourceKind = Keyboard Layout
KeyboardLayout Name = Norwegian
KeyboardLayout ID = 12
}
}
AppleDateResID = Dict {
smRoman = 12
}
AppleTimeResID = Dict {
smRoman = 12
}
AppleSelectedInputSources = Array {
Dict {
InputSourceKind = Keyboard Layout
KeyboardLayout Name = Norwegian
KeyboardLayout ID = 12
}
}
AppleDefaultAsciiInputSource = Dict {
InputSourceKind = Keyboard Layout
KeyboardLayout Name = Norwegian
KeyboardLayout ID = 12
}
AppleItlbDate = Dict {
smRoman = 16383
}
AppleNumberResID = Dict {
smRoman = 12
}
}[/code]