Karl Berry wrote:
Another thing worth mentioning is that it is better to limit strings to be translated to one number argument per sentence unit (i.e. "Searched %d directories. Found %d files" or "Searched %d directories and found %d files" rather than "Found %d files in %d directories") as some languages may prefer to express the arguments in reverse order ("In %d directories found %d files"), which printf would probably not take kindly to.
Actually, in reasonably recent versions of printf, this is handled via "... %2$d ... %1$d...". That syntax was added specifically for this issue. printf libraries that do not support this are now very old. If you care about such systems, there are add-on libraries about that you can include with your project sources that handle this correctly. Cheers - Bruce