【发布时间】:2011-09-07 14:45:27
【问题描述】:
我正在尝试在 Xcode 4 中本地化我的字符串,但我得到的唯一东西是键,而不是值。
我已经使用NSLocalizedString(key, comment) 本地化了字符串。
我已经使用命令行中的 genstrings 生成了文件 Localizable.strings 。
我已将 Localizable.strings 从 Finder 拖放到 Xcode(到 Resources 文件夹中)。
我已本地化 Localizable.strings 并添加了相应的国家/地区。
我已经确定编码是 UTF-16。
我已经为每个国家/地区翻译了不同的 Localizable.strings。
我重新检查了编码仍然是 UTF-16。
我检查了 Localizable.strings 中的每个语句都以分号结尾。
还是不行。
知道我错过了什么吗?
编辑
这是我的 Localizable.strings 的一部分
/* Text displayed on the comment button if there are more than one comment. */
"CommentButtonTextPlural" = "comments";
/* Text displayed on the comment button if there is exacly one comment. */
"CommentButtonTextSingular" = "comment";
/* Text displayed on the post button. */
"CommentViewPostButtonLabel" = "Post";
/* Default text displayed in the area where the user types in a comment. */
"CommentViewWriteAComment" = "Write a comment...";
/* Error message explaining that a document isn't viewable on the user's device. */
"DocumentRendererStatusDetailedErrorText" = "This document is not viewable on this device.";
/* Message explaining that the document is downloading. */
"DocumentRendererStatusDownloadingText" = "Downloading...";
【问题讨论】:
-
你能发布你的 Localizable.strings 的内容吗?如果不是全部,至少是标题和前几个键。
-
完成。我在文件的一部分中添加了英文翻译(呃!)。 :-)
标签: objective-c ios xcode4