I have a 2 localized string files, one for Romanian and one for English. In both files I have this line:
English:
"invalidSum" = "Invalid amount"
Romanian:
"invalidSum" = "Suma invalida"
I use this message in a alert like this:
let titleAlert = NSLocalizedString("invalidSum", comment: "")
let sumAlert = UIAlertController(title: titleAlert, message: nil, preferredStyle: .alert)
sumAlert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))
present(sumAlert, animated: true, completion: nil)
}
However, whenever the alert shows, I get the message "invalidSum", not "Invalid amount" for english localization and "Suma invalida" for romanian localization. What am I doing wrong?