【问题标题】:Apple Watch app does not localizeApple Watch 应用程序未本地化
【发布时间】:2018-04-11 00:18:04
【问题描述】:

我已经为德语、法语、西班牙语和简体中文设置了 interface.storyboard 字符串。我下载了 iOS 应用程序并将其加载到手表上。然后,例如,我将手表语言设置为德语。但是界面还是英文的。

这里是 interface.storyboard 字符串:

    /* Class = "WKInterfaceButton"; title = "Start Timer"; ObjectID = "1oP-Ed-sIA"; */
"1oP-Ed-sIA.title" = "Timer starten";

/* Class = "WKInterfaceButton"; title = "0:30"; ObjectID = "Kti-O4-Ky6"; */
"Kti-O4-Ky6.title" = "0:30";

/* Class = "WKInterfaceDate"; format = " h:mm:ss a"; ObjectID = "P50-YW-9sa"; */
"P50-YW-9sa.format" = " h:mm:ss a";

/* Class = "WKInterfaceButton"; title = "0:15"; ObjectID = "QLq-vX-zHG"; */
"QLq-vX-zHG.title" = "0:15";

/* Class = "WKInterfaceButton"; title = "Do Not Disturb"; ObjectID = "Zku-u8-rhy"; */
"Zku-u8-rhy.title" = "Bitte nicht stören";

/* Class = "WKInterfaceButton"; title = "Stop Timer"; ObjectID = "afW-nF-dFL"; */
"afW-nF-dFL.title" = "Stoppuhr";

/* Class = "WKInterfaceButton"; title = "0:60"; ObjectID = "tDV-Bi-XDn"; */
"tDV-Bi-XDn.title" = "0:60";

这是手表截图:

【问题讨论】:

    标签: localization apple-watch


    【解决方案1】:

    我发现必须在本地化字符串设置“目标成员资格”下选择监视目标和监视扩展目标。我不知道为什么,因为据说只有在存在影响 UI 的代码时才需要对扩展进行本地化,而不仅仅是故事板。但这样做确实会本地化手表 UI。

    【讨论】:

    • 在我看来这是从 watchOS 6.2 开始的正确解决方案。你应该这样标记它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-05-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多