Re: localized resources in root tool
Re: localized resources in root tool
- Subject: Re: localized resources in root tool
- From: Douglas Davidson <email@hidden>
- Date: Mon, 20 Jan 2003 10:29:51 -0800
On Sunday, January 19, 2003, at 2:16 AM, Finlay Dobbie wrote:
OK, I have a root tool which passes status information back to its
parent process which runs as a user. However, it inherits the
international prefs of root, which are pretty much always English
unless someone enables root, logs in as root and changes them. How
can I get around this? Anybody got any code for discovery of the
locale and loading the correct strings file manually? I vaguely
remember this came up a few years back in relation to
CFUserNotification...
OK, I think I found a solution. Get the AppleLanguages array from
NSUserDefaults, then pass that to my tool, and then use the CFBundle
functions about localization with that array to get the fun stuff.
That sounds like a reasonable solution. The other option is to pass
back information in some non-localized format--status codes,
perhaps--and let the user-level application do the localization itself.
That may not be possible in all situations, but if it is it may make
for a cleaner design.
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.