4 ms·
how would this work with internationalized strings? especially if you have to change the order of things? You'd still need a string version with object ordering
by puffybuf 2y ago
how would this work with internationalized strings? especially if you have to change the order of things? You'd still need a string version with object ordering I would think
- mkoubaa 2y agoI'm skeptical that people would want to do this in a single expression.
- rerdavies 2y agoDo what? Allow translators to reorder the appearance of arguments in a translated format string? It's a completely routine (and completely necessary) feature when doing translations.
- edflsafoiewq 2y agof-strings are not an internationalization library.
- wakawaka28 2y agoThe question was, how would you use this if you have i18n requirements. Format strings are normally part of a translation. I think the bad answer is to embed the entire f-string for a translation as usual, except this can't work because C++ f-strings would need to be compiled. The better answer is, don't use f-strings for this because you don't want translators to monkey around with code and you don't want to compile 50 versions of your code.
- mkoubaa 2y agoC++ is such a narrow skillset that I'd rather not roll the dice on translators knowing what to do
- wakawaka28 2y agoEven if you told them, "just copy the names from the original string" it's still asking for trouble, and maybe even security holes if they don't follow instructions. But the biggest problem with the idea is surely that the strings need to be compiled.