[textVIEw1 insertText:[Nsstring stringWithFormat:@"%@ è il %i/%i/%i. Il giorno delle settimana è %@. La Festa è compresa nel calcolo. \n",nomeFesta,giornoFesta,meseFesta,annoFestaModificato,ggSett]];
我把文件localizable.string(英文):
"festaCompresa" = @"%@ is the %i/%i/%i. the day of the week is %@. The holIDays is included in the calculation. \n";
然后我编辑了这段代码:
[textVIEw1 insertText:[Nsstring stringWithFormat:NSLocalizedString(@"festaCompresaW,@""),ggSett]];
这是行不通的.
解决方法 你复制粘贴代码了吗?或者你重新输入了吗?因为如果你复制粘贴它就会出现问题:[textVIEw1 insertText:[Nsstring stringWithFormat:NSLocalizedString(@"festaCompresaW,ggSett]];
我想它应该是
[textVIEw1 insertText:[Nsstring stringWithFormat:NSLocalizedString(@"festaCompresa",ggSett]];
所以基本上是“而不是W.
另外,在Localizable.strings中你没有把@放在引号的前面,所以这个:
"festaCompresa" = @"%@ is the %i/%i/%i. the day of the week is %@. The holIDays is included in the calculation. \n";
应该这样:
"festaCompresa" = "%@ is the %i/%i/%i. the day of the week is %@. The holIDays is included in the calculation. \n";
希望能帮助到你
总结以上是内存溢出为你收集整理的objective-c – 占位符和NSLocalizedString全部内容,希望文章能够帮你解决objective-c – 占位符和NSLocalizedString所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)