无法加载英文本地化文件
英语的 Localized.strings 未加载。它以前有效,但不仅我可以看到琴弦的键。另一方面,捷克琴弦负载良好。我也知道至少有两个关于这个主题的线程,但是,它们对我没有帮助。
摘要:
- 我在 cs.lproj 和 en.proj 目录中有两个本地化字符串,
- 仅加载了捷克语字符串。
- 之前也加载了英文版,但现在我只能看到只是按键。
- 我尝试清理我的项目。
- 我尝试从设备上卸载应用程序。
- 我尝试按照建议将 Localized.strings 保存为 UTF-8 和 UTF-16。
- 我已经尝试过第4-6点了。
Localizable.strings for english language didn't load. It previously worked but not only I can see are the keys of the strings. On the other hand Czech strings are loaded fine. I am also aware there at least two threads about this topic, however, they didn't help me.
Summary:
- I have two localized strings in cs.lproj and en.proj directories
- Only Czech one is loaded.
- The English one was previously loaded too but now only I can see are just keys.
- I have tried to clean my project.
- I have tried to uninstall an app from device.
- I have tried to save Localized.strings as UTF-8 as well as UTF-16 as recommended.
- I have tried points 4-6 at once.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
解决方案:我的项目包含另一个用于英语的 Localized.strings 文件。它位于 ShareKit 库内。我不知道这一点,因为我接手了这个项目而不是以前的程序员。所以我删除了该文件,现在可以正常工作了。抱歉打扰您了。希望它可以帮助其他人 - 只需在您的项目中搜索 Localized.strings 重复项即可。
The solution: My project contained another Localizable.strings file for english language. It was inside ShareKit library. I didn't know it as I took this project over previous programmer. So I removed the file, now it works fine. Sorry for bothering you. May it can help someone other - simply search your project for Localizable.strings duplicates.
您应该查看应用程序包的内部,看看是否包含 Localized.strings 文件。为此,请右键单击 YourApp.app ->显示包装内容。查找 en.lproj 文件夹并查看是否存在 Localized.strings 文件。如果是,则检查其内容是否正确。
否则,英文翻译文件中可能存在错误,或者 XCode 正在运行(我遇到过这个问题几次 - 进行干净的构建,重新启动 XCode,然后一个新的构建似乎可以修复它)。
You should look inside the app package to see if your Localizable.strings file is included. To do this, right click on YourApp.app -> Show Package Contents. Look for the en.lproj folder and see if the Localizable.strings file is there. If it is, then check that its content is correct.
Otherwise, there might either be an error in the english translation file, or XCode is acting up (I had this problem a few times - doing a clean build, restarting XCode and them a new build seemed to fix it).