• 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: Converting a .strings text file to a NSArray or NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting a .strings text file to a NSArray or NSDictionary


  • Subject: Re: Converting a .strings text file to a NSArray or NSDictionary
  • From: Alexander Spohr <email@hidden>
  • Date: Thu, 28 Sep 2006 13:13:05 +0200


Am 28.09.2006 um 10:01 schrieb Dev WO:

Hello Atze:)

rehi xavier :)

a .strings file is not a valid plist. so it does not.
you have to convert them to a plist (add the {}, as you already told xavier) before NSPropertyListSerialization can read them.
the {} are already in there. I'm not sure I understand Atze, does NSPropertiyListSerialization can handle .string files with {}?

NSPropertyListSerialization has no notion of a file-extension. so you can name your file whatever you like.


a .strings-file is a dictionary-plist without the enclosing {}.

xavier, just forget those .strings and convert them all to dictionary-plists.
As it seems I'm not using the "good" way to do it, I agree to go for plist;) just 2 questions:
-WOResourceManager.stringForKey works the same way on plist and .strings file? (I feel like I'm asking a dumb question...)

no. it will not. you have to load and cache the plists yourself.
if you 'only' need key-to-string matching you might stick with .strings. if you need more switch to plists.


-Is there a "tool" I could use to convert my already existing .strings files (they are quite long)?

none that i know of.

you could even use xml in those files.
see http://www.apple.com/DTDs/PropertyList-1.0.dtd

Thanks Atze:)

welcome ;)

	atze

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Converting a .strings text file to a NSArray or NSDictionary (From: Dev WO <email@hidden>)
 >Re: Converting a .strings text file to a NSArray or NSDictionary (From: Jan Grathwohl <email@hidden>)
 >Re: Converting a .strings text file to a NSArray or NSDictionary (From: Dev WO <email@hidden>)
 >Re: Converting a .strings text file to a NSArray or NSDictionary (From: Chuck Hill <email@hidden>)
 >Re: Converting a .strings text file to a NSArray or NSDictionary (From: Dev WO <email@hidden>)
 >Re: Converting a .strings text file to a NSArray or NSDictionary (From: Chuck Hill <email@hidden>)
 >Re: Converting a .strings text file to a NSArray or NSDictionary (From: Alexander Spohr <email@hidden>)
 >Re: Converting a .strings text file to a NSArray or NSDictionary (From: Dev WO <email@hidden>)

  • Prev by Date: Re: Duplicate entry [ was addObjectsToBothSide... not really both side] [SOLVED]
  • Next by Date: Re: Newbie : Upload file to database Method
  • Previous by thread: Re: Converting a .strings text file to a NSArray or NSDictionary
  • Next by thread: Re: Converting a .strings text file to a NSArray or NSDictionary
  • Index(es):
    • Date
    • Thread