I have this function to display a localized text with parameters:
func displayLocalizedMessage(key: String, args: [CVarArg]) {
someLabel.text = String.localizedStringWithFormat(NSLocalizedString(key, comment: ""), args)
}
If I call it passing two parameters, for example, notificationPostTagging as key and ["Joshua"] for args and the localized string is like this:
"notificationPostTagging" = "%@ tagged you in a post.";
I'm getting this printed in the app:
(
Joshua
) tagged you in a post.
Does anyone have any idea how to fix this. I can't pass the second parameter as a comma-separated list because it comes from some other object.
Thanks