NSLocalizedString我將如何使用NSLocalizedString
該字符串:與格式
[NSString stringWithFormat:@"Is 「%@「 still correct for 「%@「 tap 「OK「 otherwise tap 「Change「 to choose new contact details", individual.contactInfo, individual.name];
當使用stringWithFormat我在下面的方式使用它之前:
[NSString stringWithFormat:@"%d %@", itemCount, NSLocalizedString(@"number of items", nil)];
熱舔有正確的答案,但我也建議閱讀http://nshipster.com/nslocalizedstring/ – 2013-02-20 16:16:04
我想我的答案不能處理嵌入的引號,但它們在原文中被打破。 – 2013-02-20 17:28:47
本地化字符串的iOS實現的一個顯而易見的缺點是該註釋不包含在關鍵字的一部分中。出於這個原因,你可以有兩個不同的消息,使用相同的英文措辭,但不同的評論,操作系統不會(顯然)能夠消除歧義他們。 – 2013-02-20 17:32:28