I am trying to localize my SwiftUI Watch app. I don't have any problems with static strings. I use LocalizedKeyStrings in my Text views and add my translations in Localizable.strings files. For example:
Text("history")
in Localizable.strings:
"history" = "Historique";
Result : "Historique"
But I also want to localize stings using interpolation. For example:
Text("startCustom \(format: "%.1f",customDistance)")
In Localizable.strings, I have tried with different syntax:
"startCustom %@" = "Course de %@ km";
or
"startCustom %f" = "Course de %f km";
or
"startCustom %.1f" = "Course de %.1f km";
Nothing works. I don't find any documentation for that ...