iPhone 上未拾取国际化文件
我有一个已在我的应用程序中翻译的 .plist。最初,我在应用程序根目录下有一个 .plist (icons.plist)。我按如下方式加载文件:
[[NSBundle mainBundle] pathForResource:@"icons" ofType:@"plist"]
对文件进行本地化后,添加我的特定语言(在本例中为 de),我已检查以确保 icon.plist 存在于 English.lproj 和 de.lproj 中(确实存在)。
我一直以这种方式执行 i18n,并且在此之前它一直有效,但现在它似乎没有获取更新的德语文件。
NSLogging 它使用的路径我发现它仍在查找“myApp.app/icons.plist”而不是我所假设的“myApp.app/de.lproj/icons.plist”。
我在这里错过了一个明显的步骤吗?
I have a .plist that I have had translated in my app. Originally, I had one .plist (icons.plist) at application root. I load the file as follows:
[[NSBundle mainBundle] pathForResource:@"icons" ofType:@"plist"]
After making the file localized, adding my specific language (de in this case) I have checked to ensure icons.plist exists in English.lproj and de.lproj (it does).
I've always performed i18n this way and it has always worked prior to this, but now it doesn't seem to pick up the updated German file.
NSLogging the path it uses I find that it is still looking in "myApp.app/icons.plist" and not "myApp.app/de.lproj/icons.plist" as I would assume.
Have I missed an obvious step here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)