I began integrating localization into my app using this guide. It worked great until I localized a string that included a dynamic variable. The original was this:
let myString = "I have \(countOfMoney) dollars in my wallet."
Then I tried to mimiic this stack answer to localize it. However, I'm getting an EXC_Bad_Access error. Below is how I tried to localize it.
This is in my Localizable.strings English file:
localizedMsg="I have %@ dollars in my wallet.";
This is in my View Controller:
let countOfMoney = moneyInWallet.count
let localizedMsg = String(format: NSLocalizedString("localizedMsg", comment: ""), countOfMoney)
However, this line shows up as an error when I run the app on the simulator. How do I fix it?