希望以后遇到的朋友少走弯路。
通过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";