【问题标题】:Localization - "error: read failed: The data couldn’t be read because it isn’t in the correct format"本地化 - “错误:读取失败:无法读取数据,因为它的格式不正确”
【发布时间】:2017-11-14 07:06:17
【问题描述】:

我得到:

error: read failed: 数据无法读取,因为它不在 格式正确。

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

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

任何想法为什么?只能在 Objective-C 中找到其他答案。

【问题讨论】:

    标签: swift xcode localization


    【解决方案1】:

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

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

    【讨论】:

      【解决方案2】:

      在每行末尾添加;

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-07-17
        • 1970-01-01
        • 1970-01-01
        • 2016-10-15
        • 1970-01-01
        • 1970-01-01
        • 2019-07-28
        相关资源
        最近更新 更多