Two standard libraries?
Jason House
jason.james.house at gmail.com
Mon Jul 16 19:16:36 PDT 2007
Roberto Mariottini wrote:
> May I suggest to use an identifier instead of a numeric index?
> I have several years of experience with multi-language code and I can
> say that for a translator is better.
>
> For example:
>
> "{0} has {1} pieces in {2}"
>
> Could be:
>
> "{supplier} has {stock} pieces in {city}"
>
> and make the translator happy.
It's an interesting idea, but the trick is knowing how to go from the
identifier into the literal numerical index of the arguments. Something
like "{0,supplier} has {1,stock} pieces in {2,city}" could work.
Of course, if you're really going to support internationalization, it'd
be nice to not need to translate one copy of the program into another
and simply embed the text for multiple languages in the command line.
Another candidate would be to put it through some kind of behind the
scenes translator. Maybe the two could be combined... where the
program could be run for a specific language and text would be
translated first by a manual translation if available and then either
dump the original (english) or attempt an automatic translation.
More information about the Digitalmars-d
mailing list