Boost logo

Boost :

From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2001-12-19 14:28:08


----- Original Message -----
From: "Karl Nelson" <kenelson_at_[hidden]>
To: <boost_at_[hidden]>
Cc: <kenelson_at_[hidden]>
Sent: Wednesday, December 19, 2001 11:20 AM
Subject: Re: [boost] Review request : format
> > This cannot be translated because the order of numbers might be
different.
> > You may argue that dates need separate treatment as well, but:
>
> Actually it does work...
>
> "Today's date is %d-%d-%d" becomes "Today's date is %3$d-%1$d-%2$d"
>
> when the translator requires a new order. This is the system used
> be many i18n projects.

Aha, I get it. Could you point me to some online resource that covers that?

> > char* format=N_("Error code %d in transaction %d.");
> >
> > Maybe in some language a more natural sentence has the transaction
number
> > first and the error code second.
>
> Exactly. Which is why printf has positional directives.

Which printf? I don't know of the standard C printf supporting positional
directives.

Andrei


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk