|
Boost : |
From: Andrei Alexandrescu (andrewalex_at_[hidden])
Date: 2001-12-19 14:16:09
From: "Karl Nelson" <kenelson_at_[hidden]>
To: <boost_at_[hidden]>
Cc: <kenelson_at_[hidden]>
Sent: Wednesday, December 19, 2001 11:00 AM
Subject: Re: [boost] Review request : format
> Thus we get a program like
>
> char* format=N_("Your name is %s, and your age is %d.");
> printf(format,name,age);
>
> When it comes time for internationalization these strings are parsed
> out to a file where they are given to the translator. The translator
> sends back a file which contains a map from string to string.
This won't work. You need positional parameters. The problem is with strings
such as:
char* format=N_("Today's date is %d-%d-%d.");
This cannot be translated because the order of numbers might be different.
You may argue that dates need separate treatment as well, but:
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.
Andrei
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk