• 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: Reading string from .strings file not in a bundle?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reading string from .strings file not in a bundle?


  • Subject: Re: Reading string from .strings file not in a bundle?
  • From: Jeffrey Mattox <email@hidden>
  • Date: Thu, 15 May 2003 16:46:24 -0500

At 5:19 PM -0400 5/15/03, Steve Bennett wrote:
Does anyone know if there's a Cocoa mechanism for obtaining a string from a
.strings format file at an arbitrary location, which may not be in a bundle,
short of reading in the file data and parsing it myself? I haven't been
able to find anything like this in my searching.

I was just reading the thread before your post, "Tip for Cocoa newbies (and pros)," and, using a program suggested there, AppKiDo, for the very first time, typed "strings" into the Find box, clicked "Include methods" and instantly found this:

NSSring: - (NSDictionary *)propertyListFromStringsFileFormat
Returns a dictionary object initialized with the keys and values
found in the receiver. The receiver must contain text in the format
used for .strings files.

Elapsed time: 20 seconds, tops.

Sounds like the answer to your question. You just need to read the file into an NSString, then apply that method. And, I can recommend AppKiDo.

Jeff
_______________________________________________
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.

References: 
 >Reading string from .strings file not in a bundle? (From: Steve Bennett <email@hidden>)

  • Prev by Date: Some questions...
  • Next by Date: Re: NSPopUpButton failure after adding file names
  • Previous by thread: Reading string from .strings file not in a bundle?
  • Next by thread: Some questions...
  • Index(es):
    • Date
    • Thread