Advanced Localization with Omission of Arguments in Xcode

前端 未结 2 704
刺人心
刺人心 2020-12-06 18:52

I have this formatted string that I am having a translator work on.

ENGLISH

\"Check out the %1$@ %2$@ in %3$@: %4$@\" = \"Check out the %1$@ %2$@ in         


        
2条回答
  •  攒了一身酷
    2020-12-06 19:17

    This is not a bug. Numbered arguments are not part of the C standard, but part of IEEE Std 1003.1, which says the following (emphasis mine):

    The format can contain either numbered argument conversion specifications (that is, "%n$" and "*m$"), or unnumbered argument conversion specifications (that is, % and * ), but not both. The only exception to this is that %% can be mixed with the "%n$" form. The results of mixing numbered and unnumbered argument specifications in a format string are undefined. When numbered argument specifications are used, specifying the Nth argument requires that all the leading arguments, from the first to the (N-1)th, are specified in the format string.

提交回复
热议问题