Re: Application localization
Re: Application localization
- Subject: Re: Application localization
- From: Douglas Davidson <email@hidden>
- Date: Wed, 5 Dec 2001 09:59:25 -0800
On Wednesday, December 5, 2001, at 05:34 AM, Hugi Thordarson wrote:
I just moved to Cocoa, and was thrilled to see the localization
features (being a WebObjects developer). However, I am having trouble
making it work as advertised. I created a copy of the English.lproj
folder in my application and tried naming the new folder "is.lproj" or
"Icelandic.lproj" but in both cases, it would fail with an
NSInvalidArgumentException, reporting an attempt to insert a nil key
into a dictionary.
I have tried setting the preferred language to "is" using:
defaults write NSGlobalDomain AppleLanguages "( Icelandic, English)"
but to no avail.
Any ideas?
Works for me. I just tried the following:
cp -r /Applications/TextEdit.app /tmp
cp -r /tmp/TextEdit.app/Contents/Resources/English.lproj
/tmp/TextEdit.app/Contents/Resources/Icelandic.lproj
<edit
/tmp/TextEdit.app/Contents/Resources/Icelandic.lproj/InfoPlist.strings
to change "TextEdit" to "Icelandic TextEdit">
defaults write NSGlobalDomain AppleLanguages "(Icelandic, English)"
/tmp/TextEdit.app/Contents/MacOS/TextEdit &
and sure enough, it shows up as "Icelandic TextEdit". The editing stage
has to be done in TextEdit or something similar, because the .strings
files are Unicode strings-file-format text files.
When you say "it would fail with an NSInvalidArgumentException", what is
failing, and what does the backtrace look like?
Douglas Davidson