# acceding to InfoPlist.strings (cocoa)



## maccatalan (Dec 4, 2001)

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"CFBundleName" value"error" table"InfoPlist.strings"]

Thank you to help me,
Pierre.


----------



## Ghoser777 (Dec 4, 2001)

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

F-bacher


----------



## maccatalan (Dec 5, 2001)

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.)


----------



## maccatalan (Dec 28, 2001)

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


----------

