acceding to InfoPlist.strings (cocoa)

maccatalan

Registered
Hi.

I'm trying to make a cocoa program, but the alert messages would need to be localized, but to do that I would like to use the localizedString. I found a way to do that but actually it doesn't work.

What I tried :

[[NSBundle mainBundle] localizedStringForKey:mad:"CFBundleName" value:mad:"error" table:mad:"InfoPlist.strings"]

Thank you to help me,
Pierre.
 
What does executing the code return? You never actually said what happens, only that it doesn't work. Does it return @"error"?

F-bacher
 
Yes, it return @"error"
but a file InfoPlist.strings is actually in my project, and the variable CFBundleName exists and it is valued to "Awale".
This file is by default in the Project and it is used to fill the info copyright text.

(In fact, it may be that it is a particular file and that we connot use this function with it. I will try with a new other.)

:)
 
The problem was that the InfoPList is reserved for a system use (for the window info as I understand it). So I make it to work easily, just adding a new plist to my project. That's all. Thank you Apple for those great functions. :)

Have you seen the new AppleScript integration in PB ? that's great it reminds me some HyperCard ... but more similar is Revolution :)

Dear HyperCard, thank you for all
;)
 
Back
Top