[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: localization
From: |
Jeff Teunissen |
Subject: |
Re: localization |
Date: |
Tue, 11 Nov 2003 03:58:42 -0500 |
Nicola Pero wrote:
[snip]
> > > 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.
It works on any SUSv2-compliant *nix system, and most others (which is why
it's in SUSv2 in the first place). Positional arguments are not defined for
C89 or C99, though, so some non-*nix systems may not work (cygwin, djgpp,
and emx support it, though MinGW may not).
--
| Jeff Teunissen -=- Pres., Dusk To Dawn Computing -=- deek @ d2dc.net
| GPG: 1024D/9840105A 7102 808A 7733 C2F3 097B 161B 9222 DAB8 9840 105A
| Core developer, The QuakeForge Project http://www.quakeforge.net/
| Specializing in Debian GNU/Linux http://www.d2dc.net/~deek/