I found this thread by @Daniel_Hopfl
from 2016: Localization support for string interpolation
Using the example there, I can localize the interpolated string in
SwiftUI.Text(), but only if the interpolated value is a String. Change to Int doesn't work.
let quote = "Never trust the internet!" let person = "Albert Einstein" SwiftUI.Text("<\(quote)> by <\(person)>")
should look up the key:
"<%@> by <%@>" = "%2$@ said: “%1$@”";
But if I simply change quote to an Int:
let quote = 1234
It stops working. It's as if the key doesn't match, no translation found.
I'm quite sure somehow this should work according to WWDC 2019 "What's New in Swift" https://developer.apple.com/videos/play/wwdc2019/402/
at about 13:00 she talks about localizing interpolated string....
Anyone know something about this?
Edit: She actually start talking about localizing interpolated string at 22:15