我想本地化我的游戏。我的一些标签就像[@“分数:%i”,分数],分数可以是任意数字。所以我仍然可以使用字符串文件本地化? 这就是我目前做的,但很多工作iOS本地化,带数字和单词的标签
CCLabelTTF* bestLabelWord = [Helper createLocalizedLabelWithStringUpperCase:@"BEST" color:ccBLACK];
CCLabelTTF* bestLabelNumber = [Helper createUnlocalizedLabelWithString:[NSString stringWithFormat:@"%i", bestScore] color: ccBLACK];
bestLabelWord.anchorPoint = ccp(0, 0.5f);
bestLabelNumber.anchorPoint = ccp(0, 0.5f);
bestLabelWord.position = ccp(menuPosX, menuPosY2);
bestLabelNumber.position = ccp(menuPosX + bestLabelWord.contentSize.width + 5, menuPosY2);
[self addChild:bestLabelWord z:kZLabel];
[self addChild:bestLabelNumber z:kZLabel];
这里我分开@“得分”,@“%i”的,将比分追成2个标签(字和数字),并分开放置。 那么我怎么能把它们放到一个标签?我可以把“NSString stringWithFormat”放在localization.strings文件中吗?
什么是@“Score格式”? – OMGPOP 2012-02-02 02:35:11
我应该把什么字符串文件? – OMGPOP 2012-02-02 02:36:01
http://stackoverflow.com/questions/1442822/what-is-second-param-of-nslocalizedstring – 2012-02-02 02:36:29