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. …
我将如何使用NSLocalizedString此字符串:
[NSString stringWithFormat:@"Is “%@“ still correct for “%@“ tap “OK“ otherwise tap “Change“ to choose new contact details", individual.contactInfo, individual.name];
Run Code Online (Sandbox Code Playgroud)
在使用stringWithFormat之前我以下列方式使用它:
[NSString stringWithFormat:@"%d %@", itemCount, NSLocalizedString(@"number of items", nil)];
Run Code Online (Sandbox Code Playgroud)