• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Copyright Info from InfoPlist.strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Copyright Info from InfoPlist.strings (From: Mitchell Livingston <email@hidden>)
 >Re: Copyright Info from InfoPlist.strings (From: Julio Cesar Silva dos Santos <email@hidden>)
 >Re: Copyright Info from InfoPlist.strings (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Tracking rectangles with Cocoa views in Carbon windows
  • Next by Date: Re: Cocoa Bindings master-detail interface with sets of data in the detail part
  • Previous by thread: Re: Copyright Info from InfoPlist.strings
  • Next by thread: What is the highlight color for a selected row in a table/outline view?
  • Index(es):
    • Date
    • Thread