无法加载英文本地化文件

发布于 2024-12-11 18:04:31 字数 343 浏览 0 评论 0原文

英语的 Localized.strings 未加载。它以前有效,但不仅我可以看到琴弦的键。另一方面,捷克琴弦负载良好。我也知道至少有两个关于这个主题的线程,但是,它们对我没有帮助。

摘要:

  1. 我在 cs.lproj 和 en.proj 目录中有两个本地化字符串,
  2. 仅加载了捷克语字符串。
  3. 之前也加载了英文版,但现在我只能看到只是按键。
  4. 我尝试清理我的项目。
  5. 我尝试从设备上卸载应用程序。
  6. 我尝试按照建议将 Localized.strings 保存为 UTF-8 和 UTF-16。
  7. 我已经尝试过第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:

  1. I have two localized strings in cs.lproj and en.proj directories
  2. Only Czech one is loaded.
  3. The English one was previously loaded too but now only I can see are just keys.
  4. I have tried to clean my project.
  5. I have tried to uninstall an app from device.
  6. I have tried to save Localized.strings as UTF-8 as well as UTF-16 as recommended.
  7. I have tried points 4-6 at once.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一个人的旅程 2024-12-18 18:04:31

解决方案:我的项目包含另一个用于英语的 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.

羁拥 2024-12-18 18:04:31

您应该查看应用程序包的内部,看看是否包含 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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文