首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >NSLocalizedString in iWatch

NSLocalizedString in iWatch
EN

Stack Overflow用户
提问于 2017-02-15 03:21:30
回答 1查看 217关注 0票数 0

我在iWatch中将我的应用程序本地化为两种语言。除了复杂和警报对话框之外,大多数文本都被本地化了。

有人能帮我吗?

警报代码

代码语言:javascript
运行
复制
    let restartAction = WKAlertAction(title: NSLocalizedString("OK", comment: ""), style: .destructive, handler: {
        //some code here
    })

    let cancelAction = WKAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .cancel, handler: {})

    presentAlert(withTitle: NSLocalizedString("Restart the page?", comment: ""), message: "", preferredStyle: .alert, actions: [restartAction, cancelAction])
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-17 20:01:39

我解决了这个问题:

选择localizable.string文件,在inspector>Target成员资格文件中,在手表扩展名上放置复选标记。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42240111

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档