ios - WatchKit 如何创建自定义 Localizable.strings 文件?

标签 ios localization watchkit

我通过激活本地化为 WatchKit 应用程序中的 interface.storyboard 创建了以下文件:

enter image description here

在 IOS 应用程序中,我还有 Localisable.strings 文件,我在其中放置了特定语言的所有自定义单词(但我不记得我是如何创建它的,或者它是否是自动创建的):

enter image description here

如何在 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/

相关文章:

wpf - ResourceDictionary 源绑定(bind)到模块(用于本地化)

用于检测浏览器语言偏好的 JavaScript

ios - Apple Watch 的事件应用程序 - 画圆圈?

swift - 填充 WKInterfaceTable

iphone - 为什么我的崩溃报告没有符号化?

ios - 核心数据 64 位转换

ios - Objective-C 如何正确实现协议(protocol)或其他解决方案

iphone - Google 帐户 OAuth2 支持框架?

ember.js - 在 ember.js 中创建自定义未绑定(bind)助手

ios - Watchkit 表行背景颜色以编程方式