是否可以将设置包和主要应用程序本地化资源结合起来?

发布于 2024-09-12 05:33:06 字数 319 浏览 3 评论 0原文

在本地化设置包的文档中,此处< /a>,这似乎暗示用户默认值中的字符串仅使用设置包中的 .strings 文件进行本地化。

是否可以将这些 .strings 文件与主应用程序的本地化资源结合起来,以便所有翻译都位于单个位置,而不是分布在主应用程序包和设置包中?

In the documentation for localising settings bundles, here, it seems to imply that the strings in the user defaults are only localised using the .strings files within the settings bundle.

Is it possible to combine these .strings files with the main application's localisation resources so that all translations are in a single location rather than spread across the main application bundle and the settings bundle?

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

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

发布评论

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

评论(1

淡莣 2024-09-19 05:33:06

不,捆绑包的目的是封装其中包含的数据。系统设置应用程序只关心设置包内的内容。另一方面,默认情况下,常规应用程序只关心其包内的内容。我可以想象,可以破解这个并将所有内容存储在设置包中。只需创建自己的 NSLocalizedString 宏即可在设置包中搜索字符串,但这会产生比解决更多的问题。

No, bundles have been are meant to encapsulate data contained within them. System settings app cares just about what is inside the settings bundle. On the other hand regular app cares only about what is inside its bundle, by default. I can imagine that it is possible to hack this and store everything in the settings bundle. It is just a matter of creating own NSLocalizedString macros which would search for strings just in the settings bundle, but this creates more problems than solves.

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