- This topic has 26 replies, 8 voices, and was last updated 16 years, 2 months ago by
thomasb.
-
AuthorPosts
-
September 18, 2008 at 6:50 pm #374163
jdyck
ParticipantWorking on my first image here and wondering how I can configure instaDMG to create the image in French? If I was doing this by hand I’d boot of the Installer CD and choose French at the prompt but I want it to be fully automated if possible. Any ideas?
September 18, 2008 at 7:02 pm #374164jdyck
ParticipantNever mind, I just answered my own question – for anyone else looking it’s pretty easy. The InstaDMG script has a line that states:
# Default ISO code for default install language. Script default is English.
ISO_CODE=”en”Change the “en” to “fr” or the iso code of the language you want.
September 29, 2008 at 11:17 pm #374291jdyck
ParticipantHmmm, I seem to have jumped to the conclusion too quickly that this would work… I’m having a difficult time building an image that is fully in French…
I’ve tried both of the following:
• In instadmg.bash, I’ve edited the ISO_CODE=”en” line to be “fr”
• My understanding of InstaUp2Date is that I can have a ISO Langage Code line near the top of my “master” catalog file, so I have something like:
MasterImageName.catalog
[code]Output Volume Name = Macintosh HD
Output File Name = ImageName
ISO Language Code = frBase OS Disk:
Apple Updates:
include-file: Apple-BaseOS.catalog #(This would be my “vanilla” file, with 10.5.5 and all other updatesSystem Settings:
Admin User createUser-admin.pkg hash
Clear Reg clearReg.pkg hash
etc[/code]
I’ve also deleted the BaseImage in the Cache folder after making these changes, but unfortunately I’m still getting an image in English. Am I missing something here?October 2, 2008 at 5:43 pm #374331knowmad
Participantanother fellow asking the same question is going about it differently:
[url]https://www.afp548.com/forum/viewtopic.php?showtopic=22427&lastpost=true#22445[/url]October 19, 2008 at 10:20 pm #374493trondah
ParticipantDid you find a way to do this? I’m looking to do the same thing, can’t find any information on how to change localization.
October 20, 2008 at 1:29 pm #374505Giobbi
ParticipantIm having some trouble here too. I can’t manage to set the keyboard-layout to Swedish.
This file do i have to set: /Library/Preferences/com.apple.HIToolbox.plist:
[i]defaults read /Library/Preferences/com.apple.HIToolbox{
AppleDateResID = {
smRoman = 7;
};
AppleDefaultAsciiInputSource = {
InputSourceKind = “Keyboard Layout”;
“KeyboardLayout ID” = 7;
“KeyboardLayout Name” = “Swedish – Pro”;
};
AppleEnabledInputSources = (
{
InputSourceKind = “Keyboard Layout”;
“KeyboardLayout ID” = 7;
“KeyboardLayout Name” = “Swedish – Pro”;
}
);
AppleItlbDate = {
smRoman = 16383;
};
AppleItlbNumber = {
smRoman = 16383;
};
AppleNumberResID = {
smRoman = 7;
};
AppleSelectedInputSources = (
{
InputSourceKind = “Keyboard Layout”;
“KeyboardLayout ID” = 7;}
);
AppleTimeResID = {
smRoman = 7;
};
}
[/i]But how do i set:
[i] AppleSelectedInputSources = (
{
InputSourceKind = “Keyboard Layout”;
“KeyboardLayout ID” = 7;
“KeyboardLayout Name” = “Swedish – Pro”;
}
[/i]Does anyone know? Please share..
: )
p
October 20, 2008 at 7:34 pm #374509Patrick Fergus
ParticipantIt’s an array of dicts (with a single dict as an array entry). Defaults will choke–try PlistBuddy instead.
– Patrick
October 20, 2008 at 8:23 pm #374511Patrick Fergus
ParticipantA few more specifics.
Apple (and others) can write plists that defaults is not powerful enough to edit. This is where PlistBuddy (mind the capitalization) comes in. Installed by default at /usr/libexec/PlistBuddy on Leopard (older OSes are BYOPB ), you can use PlistBuddy to do all sorts of tricks that would blow defaults’ mind. However, the syntax is a bit…abstract. In your case the commands would be as follows if run from a payload-free InstaDMG CustomPKG:[code]#!/bin/bash
#A few variables for readability
PBPath=$3/usr/libexec/PlistBuddy
HIToolBoxPlist=$3/Library/Preferences/com.apple.HIToolbox.plist#Create the AppleSelectedInputSources array
$PBPath -c “Add :AppleSelectedInputSources array” $HIToolBoxPlist#Create a dict at index 0 of the array
$PBPath -c “Add :AppleSelectedInputSources:0 dict” $HIToolBoxPlist#In the dict at index 0, create keys of various types and then set their values
$PBPath -c “Add :AppleSelectedInputSources:0:InputSourceKind string” $HIToolBoxPlist
$PBPath -c “Set :AppleSelectedInputSources:0:InputSourceKind \”Keyboard Layout\”” $HIToolBoxPlist
$PBPath -c “Add :AppleSelectedInputSources:0:\”KeyboardLayout ID\” integer” $HIToolBoxPlist
$PBPath -c “Set :AppleSelectedInputSources:0:\”KeyboardLayout ID\” 7″ $HIToolBoxPlist
$PBPath -c “Add :AppleSelectedInputSources:0:\”KeyboardLayout Name\” string” $HIToolBoxPlist
$PBPath -c “Set :AppleSelectedInputSources:0:\”KeyboardLayout Name\” \”KeyboardLayout Name\”” $HIToolBoxPlist[/code]YMMV with the above–it seems to be ok. If anyone has any suggestions for a collection of PlistBuddy examples, I’d be interested.– Patrick
October 21, 2008 at 3:23 pm #374515alantrewartha
Participantfor the record, here’s the ‘regionalise as British’ part of my customising postflight script that sets up the default user setup in the ‘international’ preference panes. (timezone is set on firstboot with systemsetup)
i found i needed both AppleEnabledInputSources and AppleSelectedInputSources to get it to work.
[code]# ‘regionalise’ as British
/usr/libexec/PlistBuddy -c “Add AppleEnabledInputSources array” “$3″/Library/Preferences/com.apple.HIToolbox.plist
/usr/libexec/PlistBuddy -c “Add AppleEnabledInputSources:0 dict ” “$3″/Library/Preferences/com.apple.HIToolbox.plist
/usr/libexec/PlistBuddy -c “Add AppleEnabledInputSources:0:\”KeyboardLayout ID\” integer 2″ “$3″/Library/Preferences/com.apple.HIToolbox.plist
/usr/libexec/PlistBuddy -c “Add AppleEnabledInputSources:0:\”KeyboardLayout Name\” string British” “$3″/Library/Preferences/com.apple.HIToolbox.plist/usr/libexec/PlistBuddy -c “Add AppleSelectedInputSources array” “$3″/Library/Preferences/com.apple.HIToolbox.plist
/usr/libexec/PlistBuddy -c “Add AppleSelectedInputSources:0 dict ” “$3″/Library/Preferences/com.apple.HIToolbox.plist
/usr/libexec/PlistBuddy -c “Add AppleSelectedInputSources:0:\”KeyboardLayout ID\” integer 2″ “$3″/Library/Preferences/com.apple.HIToolbox.plist
/usr/libexec/PlistBuddy -c “Add AppleSelectedInputSources:0:\”KeyboardLayout Name\” string British” “$3″/Library/Preferences/com.apple.HIToolbox.plist/usr/libexec/PlistBuddy -c “Add AppleDateResID:smRoman array” “$3″/Library/Preferences/com.apple.HIToolbox.plist
/usr/libexec/PlistBuddy -c “Add AppleDateResID:smRoman:0 integer 2” “$3″/Library/Preferences/com.apple.HIToolbox.plist
/usr/libexec/PlistBuddy -c “Add AppleTimeResID:smRoman array” “$3″/Library/Preferences/com.apple.HIToolbox.plist
/usr/libexec/PlistBuddy -c “Add AppleTimeResID:smRoman:0 integer 2” “$3″/Library/Preferences/com.apple.HIToolbox.plist
/usr/libexec/PlistBuddy -c “Add AppleNumberResID:smRoman array” “$3″/Library/Preferences/com.apple.HIToolbox.plist
/usr/libexec/PlistBuddy -c “Add AppleNumberResID:smRoman:0 integer2” “$3″/Library/Preferences/com.apple.HIToolbox.plist/usr/libexec/PlistBuddy -c “Add AppleLocale string en_GB” “$3″/Library/Preferences/.GlobalPreferences.plist
/usr/libexec/PlistBuddy -c “Add Country string GB” “$3″/Library/Preferences/.GlobalPreferences.plist
/usr/libexec/PlistBuddy -c “Add AppleLanguages:0 string en_GB” “$3″/Library/Preferences/.GlobalPreferences.plist
[/code]October 21, 2008 at 9:55 pm #374517trondah
ParticipantHow do I know the ID of my keyboard layout? I want to set it to Norwegian. Thanks!
October 22, 2008 at 6:49 am #374521Giobbi
ParticipantGreat!
Many thanks for the example guys.
Tron:
Do this in terminal; defaults read /Library/Preferences/com.apple.HIToolboxYou will see all info regarding this.
October 22, 2008 at 6:57 am #374522trondah
Participant[QUOTE][u]Quote by: Giobbi[/u][p]Great!
Many thanks for the example guys.
Tron:
Do this in terminal; defaults read /Library/Preferences/com.apple.HIToolboxYou will see all info regarding this.[/p][/QUOTE]
That didn’t exist, but found it in ~/Library/Preferences/ByHost 🙂
October 22, 2008 at 7:13 am #374523Giobbi
ParticipantAh, sorry. Was just going to put upp this too:
defaults read ~/Library/Preferences/.GlobalPreferences
p
October 22, 2008 at 9:55 am #374525trondah
ParticipantI’ve now successfully regionalized our image based on alantrewartha’s recipe. Thanks ALOT!
Wish there was a wiki somewhere with a compilation of image customization tips. There’s so much stuff you can do with OSX that’s not documented.
December 13, 2008 at 6:47 pm #374981Giobbi
ParticipantHey trondah:
Could you post ur config here? Im having trouble with my Swedish setup.
: )
thx
p
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed