dennis
dennis

Reputation: 117

Strange Character in localized string

"sentenceFormat" = "%1$@ was first climbed on %3$@ and has a height of %2$@"; what does this localization string mean? especially %1$

Upvotes: 0

Views: 85

Answers (1)

Mike Weller
Mike Weller

Reputation: 45598

See Notes for localizers for information on this syntax.

The 1$/2$/... modifiers are used to re-arrange items in a format string, which may sometimes be required for certain languages/localizations.

In your example, the 3$ and 2$ reference the third and second arguments to [NSString stringWithFormat:...] (or whatever 'format' method was used) so that the third argument appears before the second.

Upvotes: 1

Related Questions