NSLocalizedString with variables Swift

后端 未结 5 1448
北海茫月
北海茫月 2020-12-30 00:17

I\'m trying to figure out how to use NSLocalizedString with variables.

For example, if I want to output \"by Peter and Larry\", in my Localizable.strings

5条回答
  •  囚心锁ツ
    2020-12-30 00:50

    String(format: NSLocalizedString("Pick_Only", comment: ""), sectionData.max)
    

    In Localizable.strings: "Pick_Only" = "Pick only %d";

提交回复
热议问题