我通过激活本地化为 WatchKit 应用程序中的 interface.storyboard 创建了以下文件:
在 IOS 应用程序中,我还有 Localisable.strings 文件,我在其中放置了特定语言的所有自定义单词(但我不记得我是如何创建它的,或者它是否是自动创建的):
如何在 WatchKit 应用程序中创建 Localizable.strings 文件并告诉 WatchKit 应用程序使用该文件?
此刻
myLabel = NSLocalizedString(@"msgMylabel", @"");
显示 msgMylabel 而不是 msgMylabel 的内容
Interface.strings(英文) "msgMylabel"= "我的标签";
Interface.strings(德语) "msgMylabel"= "我的标签";
最佳答案
我找到了答案:
我必须添加 WatchKit Extension(不是 WatchKit App)作为 Localizable.strings(英语) 和 Localizable.strings(德语).
关于ios - WatchKit 如何创建自定义 Localizable.strings 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29356383/