Localizing a helper app
Localizing a helper app
- Subject: Localizing a helper app
- From: email@hidden
- Date: Tue, 28 Sep 2004 14:20:00 -0600
I have a command-line helper application which is run from my main
Cocoa application. The helper app, as well as the main one, must be
localized. I put the helper app resource files in with the main app
resource files. In the helper, I create a bundle using NSBundle
bundleWithPath: and give it the main app bundle directory. The helper
uses localizedStringForKey:value:table: to retrieve strings. This
almost works, except that the helper's bundle doesn't seem to know
about the system language preference. Even when I set another language
as my preference, the helper's bundle retrieves strings from the
English resources. It's been suggested that this may be because my
helper's bundle isn't hooked in to the window manager.
The helper code can easily find out which localization is desired, but
I can't figure any way to set that in the bundle so that
localizedStringForKey will look in the proper resource file. I could
work around all this by reading in the string resource tables and doing
my own lookup etc. instead of using localizedStringForKey, but I would
prefer not to go that far, if I can find some way to get it to look in
the right resource files.
Does anyone have an idea I could try to make this work?
Michael Heins
AA7XY
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden