Macアプリを作成していますが、ラベルをローカライズしたいと思います。.stringsファイルの方がいいと思いました。.stringsしかし、Objective-Cでファイルを読み取るのに問題があります。もっと簡単な方法を探しています。
これは私の.stringファイルの内容です:
"LABEL_001" = "Start MyApp";
"LABEL_002" = "Stop MyApp";
"LABEL_003" = "My AppFolder";
...
私はすでにhttp://developer.apple.com/library/mac/#documentation/cocoa/conceptual/LoadingResources/Strings/Strings.htmlを見てきました。
これは私のコードです:
NSBundle *bundle = [NSBundle mainBundle];
NSString *strFilePath = [[NSBundle mainBundle] pathForResource:@"Labels" ofType:@"strings"];
NSString *tt =NSLocalizedStringFromTableInBundle(@"LABEL_001",strFilePath,bundle, nil);
NSLog(@"STRING ::: %@",tt);
しかし、文字列ttは"LABEL_001"、私が欲しい"Start MyApp"
私は何が間違っているのですか?