help-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: localization


From: Rob Burns
Subject: Re: localization
Date: Sun, 09 Nov 2003 15:19:13 +0700

On 2003-11-08 22:07:17 +0700 Nicola Pero <n.pero@mi.flashnet.it> wrote:


what is the best way to handle changes in grammar when localizing
applications? for example, in one language it may be more normal to
say:
> 34 entries, 5 selected
> and in another
> 5 entries of 34 selected
> (I find the second one a bit odd, for English)
> Using the formatted string @"%i entries, %i selected" doesn't allow
for translation to the second string.

Sure it does. Formatted strings can use printf's positional arguments, last
I heard.

In another form, it might be @"Hay %2$i articulos seleccionados, de %1$i totales.". The 2$ refers to the second argument after the format string, the
1$ refers to the first.

Thanks - excellent - yes you are right - that works on my GNU libc.

I think it wouldn't work if GNU libc is not used, so it's not very
portable, but well.


Thanks, I wasn't aware that you could use positional arguments, like that. My comment about gorm was because by using gorm, you wouldn't have to manage the differences in code, but without it, you would need to do something clever with the code.

Thanks

Rob





reply via email to

[Prev in Thread] Current Thread [Next in Thread]