相关疑难解决方法(0)

NSLocalizedString with swift variable

I'm trying to localize my app using NSLocalizedString. When i import the XLIFF file, most works like a charm but something do not and some string is not localized. I have noticed that the problem is from NSLocalizedString containing something variable inside like:

NSLocalizedString(" - \(count) Notifica", comment: "sottotitolo prescrizione per le notifiche al singolare")
Run Code Online (Sandbox Code Playgroud)

or

NSLocalizedString("Notifica per \(medicina!) della prescrizione \(prescription!)\nMemo: \(memoTextView.text)", comment: "Messaggio della Local Notification")
Run Code Online (Sandbox Code Playgroud)

Maybe this is not the correct syntax for thi kind of stuff. …

localization nslocalizedstring ios xliff swift

74
推荐指数
5
解决办法
4万
查看次数

标签 统计

ios ×1

localization ×1

nslocalizedstring ×1

swift ×1

xliff ×1