2017-02-15 40 views
0

我將我的應用程序本地化爲iWatch中的兩種語言。除了Complication和Alert對話框外,大多數文本都是本地化的。iWatch中的NSLocalizedString

任何人都可以幫助我嗎?

代碼警報

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]) 
+0

你有什麼試過?你看過哪些蘋果本地化文檔? –

+0

我使用這個函數來進行本地化:NSLocalizedString(「Page」,comment:「」) –

+0

您是否已將文本添加到Localizable.strings文件? – Sulthan

回答

0

我解決這個問題:

選擇localizable.string文件和文件檢查器>目標會員把對勾上觀看擴展。