I use the following code
myFunc(code:String) {
let t1f = NSLocalizedString("uiDlg Title code %s", comment: "uiDlg Title");
let t1 = String.localizedStringWithFormat(t1f, code);
The string is declared in Localizable.strings
file as
"uiDlg Title code %s" = "code [%s]";
if I call myFunc("112233")
the result string on the screen contains strange characters as
code [Ä&:#]
if I use
let t1 = String.localizedStringWithFormat(t1f, code) + code;
The second code is displayed properly as
code [Ä&:#] 112233
Do I need to use %s as the format specifier for string? I could not find such sample code, all samples contains %d or %f for number formatting...