swift - 本地化 - "error: read failed: The data couldn’ 无法读取,因为它的格式不正确”

标签 swift xcode localization

我得到:

error: read failed: The data couldn’t be read because it isn’t in the correct format.

尝试运行我的本地化文件时:

"Hi" = "Hi translated"
"Bye" = "Bye translated"

有什么想法吗?仅在 Objective-C 中找到其他答案。

最佳答案

即使您使用的 Swift 不需要 ;,您仍然需要在本地化文件中使用分号。正确的格式是:

"Hi" = "Hi translated";
"Bye" = "Bye translated";

关于swift - 本地化 - "error: read failed: The data couldn’ 无法读取,因为它的格式不正确”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44505641/

相关文章:

ios - UIPickerView 卡住 UI

ios - 跳过Xcode调试器中的线程指令

localization - Dart Intl 库的翻译问题

android - 尊重当前语言环境的自定义 Android 日期格式

swift - 为什么 'init' 不可分配?

ios - 如何更改图像选择器页面导航栏的标题?

ios - CGPDFDictionaryGetString 函数 nil 参数异常

ios - 无法从 Objective-C : "Property not found on object of type" 访问 Swift 4 类

ios - 带有 Swift 5.0 编译器的 Xcode 10.2 - 协议(protocol)继承问题

c# - 文件详细信息选项卡中的 "Language neutral"属性