简体   繁体   English

选择info.plist文件

[英]choose info.plist file

I have localized my Info.plist file, because I have to have different names for the app in different languages. 我已经本地化了Info.plist文件,因为我必须为应用程序使用不同的语言使用不同的名称。

Since I did that, the project window shows this button: choose info.plist file. 既然这样做了,项目窗口就会显示此按钮:选择info.plist文件。

在此处输入图片说明

If I click this button a window pops up with no choices. 如果单击此按钮,将弹出一个没有选择的窗口。 And worst than that, the project will not compile, giving an error error: could not read data from '/Users/user/Documents/myApp/Info.plist': The file “Info.plist” couldn't be opened because there is no such file. 最糟糕的是,该项目将无法编译,并产生错误错误:无法从“ /Users/user/Documents/myApp/Info.plist”读取数据:由于存在该文件,因此无法打开“ Info.plist”文件没有这样的文件。

In fact the message is correct, because Xcode removed it from that location and added a copy of Info.plist to every localized directory (en.lproj, PT.lproj, etc.). 实际上,该消息是正确的,因为Xcode从该位置删除了该消息并将Info.plist的副本添加到每个本地化目录(en.lproj,PT.lproj等)。

So... how do I fix this? 所以...我该如何解决?

After fighting with Xcode, the only solution that works is this: http://useyourloaf.com/blog/2010/12/15/localize-iphone-application-name.html 与Xcode战斗之后,唯一有效的解决方案是: http : //useyourloaf.com/blog/2010/12/15/localize-iphone-application-name.html

You cannot localize Info.plist as I did. 您不能像我那样本地化Info.plist。 you have to create a strings file and localize that. 您必须创建一个字符串文件并将其本地化。 Some magic links the the strings file to the info.plist. 有些魔术将字符串文件链接到info.plist。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM