So, I'm translating my app to another language. I have a few texts with variables interpolated, example:
label.text = String(format: NSLocalizedString("Your name is %d", comment: "label that show user's name"), name)
Now, I go to Localizable.strings file and translate it (I won't actually translate it):
"Your name is %d" = "Your name is %d"
But in my ViewController, the variable %d isn't showing up in letters, but in random numbers, like 782393, etc. Why is this happening? One curious thing is that in one text I did the "same thing":
anotherLabel.text = String(format: NSLocalizedString("Your name is %d and you have %d assignments", comment: "label that show user's name"), name, someArray.count)
When translating:
"Your name is %d$1 and you have %d$2 assignments" = "Your name is %d$1 and you have %d$2 assignments"
The curious thing is that the second %d shows as normal, the number of objects in the array
How it comes this is happening?
Thanks!