开发者

iPhone: string resource not resolved

开发者 https://www.devze.com 2022-12-12 08:04 出处:网络
preemptive sorry for the newbie question. I\'m trying to load strings from a resource file in an iPhone project (XCode, Objective C++). I\'ve created a file called s.strings with the following conten

preemptive sorry for the newbie question.

I'm trying to load strings from a resource file in an iPhone project (XCode, Objective C++). I've created a file called s.strings with the following content:

/* 
   s.strings
   Created by Seva on 11/22/09.
*/
"a"="b"

The file is in UTF-1开发者_如何学Go6, it's in the Resources folder in the project, XCode treats it as "text.plist.strings". There are no localizations to this file.

Then I'm trying to load that string on application start:

NSString *s = NSLocalizedStringFromTable(@"a", @"s", nil);

No matter what I do, the value of s is "a", as opposed to "b".

I must be missing something very basic - any ideas, please, what's wrong in this trivial example?


Each statement in the strings file needs to be terminated with a semicolon (;).

0

精彩评论

暂无评论...
验证码 换一张
取 消