使用内部框架本地化 iOS 应用程序
我们在 iOS 中有一个项目,我们添加了 NSLocalizedString() 以便对其进行本地化。 我们还有一个内部框架,我们使用它链接到该项目。我们为项目和框架编译了一个 Localized.strings 文件(在单个文件中),并且我们在名为 es.lproj 的文件夹中创建了本地化的西班牙语版本...但是本地化的字符串仅出现在项目 - 从我们框架内运行的代码没有显示本地化字符串 - 我们在这里错过了什么吗?!
We've got a project in iOS to which we've added NSLocalizedString() in order to localize it.
We also have an an in-house framework that we use which is linked in to the project. We've compiled a Localizable.strings file for both the project and the framework (in a single file) and we've created a localized Spanish version in a folder called es.lproj... However the localized strings are only appearing in the project - code which is running from within our framework are not showing the localized strings - is there something we've missed here?!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用 NSLocalizedStringFromTable()。
请参阅以下问题:
在多个文件中分割本地化
注意: Localized.strings 文件不会被编译,而是作为资源添加到应用程序中。
在运行时获取正确的字符串。
Try using NSLocalizedStringFromTable().
See the following question:
Split localization in many files
Note: that the Localized.strings files are not compiled but added as resources in the application.
The correct string is fetched during runtime.