[Xfce-i18n] printf and argument order

Brian J. Tarricone kelnos at xfce.org
Mon Sep 13 10:11:21 CEST 2004


Jasper Huijsmans wrote:

>On Mon, Sep 13, 2004 at 10:29:35AM +0300, Peeter Vois wrote:
>  
>
>>Hi,
>>
>>I did read printf manual page of glibc and it describes how to use
>>different order of arguments in message than programmed. For example:
>>
>>n=10;
>>i=2;
>>printf( " %d apples from %d are bad\n", i, n );
>>=> 2 apples from 10 are bad
>>
>>and it will be possible to translate it like this:
>>
>>printf( " from %2$d apples only %1$d are bad\n", i, n );
>>=> from 10 apples only 2 are bad
>>
>>So, in the translation there are arguments swapped.
>>
>>Will it be a problem in some today used systems (man page describes that
>>C99 does not support it)? Or, will it be a problem if such a trick is
>>used in translations?
>>
>A very good question. I have no idea actually. It's quite fundamental to
>translations that word order can change of course. 
>
if it's not possible to do this, perhaps translators running into this 
problem could compile a list of problematic strings.  if all else fails, 
perhaps we can come up with a better/different english wording that 
doesn't need to have the parameter order changed for other languages.  
granted, i don't know much about anything other than english, spanish, 
and mandarin, so this might not be terribly relevant.  plus we're in 
string freeze...

    -brian



More information about the Xfce-i18n mailing list