我找到了一个使用NSLocalizedString的好例子:What is the second parameter of NSLocalizedString()?
NSLocalizedString(@"Save",@"Title of the Save button in the theme saving dialog");。
/* Title of the Save button in the theme saving dialog */
"Save" = "Save";但是如果NSLocalizedString中的注释是空的呢?这意味着什么?它会自动知道在localize.strings中哪里可以找到翻译好的单词吗?
谢谢
发布于 2011-09-17 04:23:09
第一个参数是进入localizable.strings的关键。第二个参数是用于辅助翻译的注释。它根本不会影响应用程序的行为,所以它是空的还是空的都无关紧要。
发布于 2011-09-17 04:22:49
此注释是为genstrings工具保留的,用于帮助技术人员将本地化字符串翻译为新语言。
https://stackoverflow.com/questions/7449947
复制相似问题