iOS Main.string国际化不起作用

微笑希望以后遇到的朋友少走弯路。


通过Main.string配置国际化文件,切换到其他语言时有时国际化不起作用,main.string(有问题)文件在编译时好像是不会报错的。在运行时才回打印一些log。如下:


CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 90. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.

2016-06-01 10:04:02.678 Glass[2800:2442022] Unable to load .strings file: CFBundle 0x12d5a9720 </var/containers/Bundle/Application/FB133B22-02AB-4B18-8770-4AA0D40D307C/Glass.app> (executable, loaded) / Main: Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character / at line 2" UserInfo={NSDebugDescription=Unexpected character / at line 2, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 "Missing ';' on line 90" UserInfo={NSDebugDescription=Missing ';' on line 90}}




这是因为Main.string 是有问题,所以不能正常显示其他国际语言。

上述问题是在这里

"7eb-9u-XCD.text" = "Hotspot connection settings"

在末尾缺少 ; 符号,添加上就不再有问题了。

"7eb-9u-XCD.text" = "Hotspot connection settings";

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值