|
| From: | Bruce Korb |
| Subject: | Re: address@hidden: GNU Coding Standards, internatialisation and plurals] |
| Date: | Fri, 19 May 2006 16:52:32 -0700 |
| User-agent: | Mozilla Thunderbird 1.0.7 (X11/20050923) |
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
| [Prev in Thread] | Current Thread | [Next in Thread] |