Re: Copyright Info from InfoPlist.strings
Re: Copyright Info from InfoPlist.strings
- Subject: Re: Copyright Info from InfoPlist.strings
- From: Douglas Davidson <email@hidden>
- Date: Thu, 16 Aug 2007 09:38:01 -0700
On Aug 16, 2007, at 1:19 AM, Uli Kusterer wrote:
On 16.08.2007, at 02:52, Julio Cesar Silva dos Santos wrote:
You can load the strings using localizedStringForKey:value:table
method of NSBundle.
NSString * hrc = [[NSBundle mainBundle]
localizedStringForKey:@"NSHumanReadableCopyright" value:@"Error,
copyright info not found." table:@"Info"];
The second parameter is a string that will be presented if the key
is missing or the file is not available.
NSBundle's -localizedInfoDictionary or -
objectForInfoDictionaryKey ? That should be "even more correct", as
it should catch the info even if Apple decides to move it. I heard
on at least one occasion Apple have embedded the Info.plist in the
application executable itself (not in the file package).
-objectForInfoDictionaryKey: is the recommended way to obtain info
dictionary values that may or may not be localized via
InfoPlist.strings.
The mechanism for embedding an info dictionary in an unbundled
executable is described in <http://developer.apple.com/documentation/
MacOSX/Conceptual/BPRuntimeConfig/Articles/ConfigFiles.html>, but
this does not allow for localization. -objectForInfoDictionaryKey:
should be able to handle all cases, localized or not.
Douglas DAvidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden