If you have a localizable string format which contains 2 or more variables, then you should consider using positional specifiers so the translators can change the word order.
Here is an example in our code today:
NSString *chatName = [NSString stringWithFormat:NSLocalizedString(@"%@'s Group Chat %d", @"Group chat name format"), mainAccountUser.uiDisplayName, self.groupChatIndex];
Instead, consider this:
NSString *chatName = [NSString stringWithFormat:NSLocalizedString(@"%1$@'s Group Chat %2$d", @"Group chat name format; the first variable is the user's display name; the second variable is the chat index"), mainAccountUser.uiDisplayName, self.groupChatIndex];
In other languages, the word order may be different. If the translator changes the order of the variables, the existing code will crash. The modified version works correctly, and the comment provides the translators with some helpful context. (Remember, they only see the two strings we pass to NSLocalizedString; they do not see the code and variable names.)
By the way, you can get more details here:
%@ 对象
%d, %i 整数
%u 无符整形
%f 浮点/双字
%x, %X 二进制整数
%o 八进制整数
%zu size_t
%p 指针
%e 浮点/双字 (科学计算)
%g 浮点/双字
%s C 字符串
%.*s Pascal字符串
%c 字符
%C unichar
%lld 64位长整数(long long)
%llu 无符64位长整数
%Lf 64位双字
http://www.opengroup.org/onlinepubs/009695399/functions/printf.html