Re: Equivalent to NSLocalizedStringFromTable() for working with a XML?
Re: Equivalent to NSLocalizedStringFromTable() for working with a XML?
- Subject: Re: Equivalent to NSLocalizedStringFromTable() for working with a XML?
- From: George Lawrence Storm <email@hidden>
- Date: Mon, 13 Sep 2004 05:40:42 -0700
I understand that pathForResource:ofType: would get me the path to the
actual file, which I can then use to access the file and decode the
data. If I have to I will write a utility class I will utilize this.
My query is if there is a function/macro that already exists which will
do what I need in a single call, similar to the Foundation macro
NSLocalizedStringFromTable() (which in turn wraps NSBundle
-localizeStringForKey:value:table:) which is used to access the
".strings" resource(s).
I am asking prior to my writing one to do something similar for
property list formatted resource(s) and end up doing something in a
non-standard way (I don't want to reinvent the wheel for something that
seems so basic).
i.e.: If I end up writing one it's interface might look like this:
int MyLocalizedIntFromPlistTable(NSString *key, NSString *tableName,
NSString *comment)
---
On Sep 12, 2004, at 4:49 PM, Allan Odgaard wrote:
On 13. Sep 2004, at 1:37, George Lawrence Storm wrote:
Is there an equivalent to NSLocalizedStringFromTable() for working
with a XML (.plist) from within my applications bundle.
You can use pathForResource:ofType:
[...] The method first looks for a nonlocalized resource in
the immediate bundle directory; if the resource is not there,
it looks for the resource in the language-specific “.lproj”
directory (the local language is determined by user defaults).
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden