The way that we got around this was adding another level of indirection, and putting printf format strings also as localized data.
The way that we got around this was adding another level of indirection, and putting printf format strings also as localized data.
If you're on POSIX, you can use positional arguments for that:
printf("%1$d %2$s", d, s);
printf("%2$s %1$d", d, s);
Because it's not standard C, VC++ does not support it directly in printf, but it offers _printf_p with such support, and you can always #define printf _printf_p.AFAIK localising "formatting literals" is the more normal method, it avoids redundancies as you don't need two different systems (ids and format strings) and provide more flexibility with respect to e.g. cardinalities. Most ID-based systems bundle formatting support as well, if you're using an ID-based system you basically shouldn't call the language's string formatting functions.
Furthermore translating literal sections individually (without formatting context) will often yield an incorrect result as the entire phrase needs to be shuffled around, or words need to be inflected, or a literal translation suitable for "standalone" expressions does not work for the entire phrase.
More granular is generally worse for translations.
I never understood why people think this is a good idea. The exact same sequence of letters in an English phrase, which you would like to use instead of IDs, can mean two different things in two different places - and those two different meaning could have different forms in other languages. Denormalizing translation database like that seems semantically incorrect (and strikes me as programmer laziness).
I agree that in general, more granular is worse for translations - there's too much risk your split will pierce the contextual whole that's required for some translations.
The same contextual issue then arises in the original, but apparently the designers thought the trade-of was worth it.
It makes for a more readable, comprehensible source and searchable source. It's also often possible to dispatch on location additionally to text (PO files store both).
Pluralization is another nightmare of its own. Look into how Russian and similar languages pluralize. It has to do with the value of the number modulo 10, similar to English ordinals.
CLDR: http://cldr.unicode.org/
https://www.gnu.org/software/gettext/manual/html_node/Plural...
https://www.gnu.org/software/gettext/manual/html_node/Transl...
LTR vs RTL is about rendering text and unrelated to this.