Hacker News new | past | comments | ask | show | jobs | submit login

Edit: Disregard, turns out things have improved

> The %g slots are in an order reverse to what they are in English. You wonder how you'll get gettext to handle that.

I learned C/++ after C# and this is one thing that really got to me. String interpolation in C++ is extremely primitive, which would be fine only if more recent iterations of stdlib had something that wasn't so completely incompetent.

For those who don't use .Net, the Italian translation would have been: "In {1:g} directories contains {0:g} files match your query." It doesn't solve all the problems, but being able to specify indices in your template string does solve many.




The article is outdated. Gettext does have reordering syntax.

https://www.gnu.org/software/gettext/manual/html_node/c_002d...


Makes me wonder why anyone would ever design a translation system that doesn't have the ability to reorder placeholders from the very first version. Perhaps if the author doesn't know anything about languages andn their differences, but in that case they probably shouldn't write such a library ...


Thanks for the correction, I'm very pleased to be wrong!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: