%[email protected]
은 형식 문자열에 주어진 첫 번째 인수를 참조하기 때문에 다시 변경할 필요가 없습니다.
실제로 다른 경우에는 인수의 순서가 번역에서 다른 순서로 변경 될 수 있습니다. 코드가 형식을 사용하는 경우 예를 들어, 같은 일부 플레이어 속성 값을 표시합니다 :
let fmt = NSLocalizedString("Player property value", comment: "The player property value")
String(format:fmt, playerName, playerProperty, value)
당신은 "en.lproj/Localizable.strings"에있을 수 있습니다
:
/* The player property value */
"Player property value" = "Player %[email protected]'s %[email protected] is %3$d"
과의 "에서 fr.lproj/Localizable.strings "
/* The player property value */
"Player property value" = "Le %[email protected] du joueur %[email protected] is %3$d"
나 :
/* The player property value */
"Player property value" = "Le joueur %[email protected] a %3$d points de %[email protected]"