Re: Converting a .strings text file to a NSArray or NSDictionary
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