| ▲ | moltonel 3 hours ago | |||||||
It's not hard to make a case against gettext, despite its maturity and large ecosystem. IMHO pluralization is a prime example, with an API that only cleanly handles the English case, requires the developer to be aware of translation gotchas, and honnestly confusing documentation and format. Compare that to MessageFormat's pluralization example (https://github.com/unicode-org/message-format-wg/blob/main/s...) which is very easy to understand and fully in the translator's hands. | ||||||||
| ▲ | vsl 2 hours ago | parent [-] | |||||||
> IMHO pluralization is a prime example, with an API that only cleanly handles the English case That’s not true at all? Gettext is functionally limited to source code being English (or alike). It handles all translation languages just fine, and competently so. What is doesn’t have is MessageFormat’s gender selectors (useful) or formatting (arguably not really, strays from translations to locales and is better solvable with placeholders and locale-aware formatting code). > fully in the translator's hands. That is a problem that gettext doesn’t suffer from. You can’t reasonably expect translators to write correct DSL expressions. | ||||||||
| ||||||||