I am trying to create a String extension to do something like that
"My name is %@. I am %d years old".localizeWithFormat("John", 30)
which looks like this
extension String {
func localizeWithFormat(arguments: CVarArgType...) -> String {
return String.localizedStringWithFormat(
NSLocalizedString(self,
comment: ""), getVaList(arguments))
}
}
it give me the following compilation error
Type CVaListPointer does not conform to protocol CVargType
Anyone knows how to work aroundthis compilation error?