how to get the path of a localized plist under mac os x.

Posted by user272312 on Stack Overflow See other posts from Stack Overflow or by user272312
Published on 2010-03-22T04:22:17Z Indexed on 2010/03/22 4:31 UTC
Read the original article Hit count: 154

Filed under:

Hi,

i have a plist placed inside en.lproj. I am trying to get its path this way,

NSString *bundlePath = [[NSBundle mainBundle] bundlePath];
NSMutableString *localizedPath = [[NSMutableString alloc] initWithFormat:@"%@/%@.%@/%@",bundlePath,lang,@"lproj",@"1.plist"];

where 1.plist is in en.lproj/1.plist put in resources.

Does [[NSBundle mainBundle] bundlePath]; give correct path to my resources? Can any body give me any clue. I am using this for iPhone , and i am new to Mac os x development, can it be used for mac os x development as well?

-- Regards,

U'suf

© Stack Overflow or respective owner

Related posts about macosx