iOS 国际化异常:read failed: the data couldn’t be read because it isn’t in the correct format ,报错:read failed: Couldn’t parse property list because the input data was in an invalid format
报错:read failed: Couldn’t parse property list because the input data was in an invalid format
原因
国际化文件的格式错误,比如:
-
少了末尾的分号
-
少了中间的=号
-
少了双引号
-
引号、等号、分号没有成对出现
-
翻译中包含了一些不必要的特殊字符
解决方法
笨方法
最简单的方法是用肉眼去检索,找到错误,然后改正就可以了。
这一般适用于翻译文件比较小、内容比较少的情况。
像我做国际化的时候,产品经理给过来的字符串600多行,一编译,报错了,然后用肉眼找,十几个国家的文件,有时候加个翻译文件就要处理一