logoalt Hacker News

pferdetoday at 11:55 AM4 repliesview on HN

Did not gettext have this for decades? https://www.gnu.org/software/gettext/manual/html_node/Plural...


Replies

zbranieckitoday at 6:50 PM

No, gettext scales very badly, both vertically (larger systems) and horizontally (locales with rich grammatical forms like declensions etc.)

We (authors of Fluent and collaborators on MessageFormat 2.0) wrote this explainer which you may find informative - https://github.com/projectfluent/fluent/wiki/Fluent-vs-gette...

Muromectoday at 11:58 AM

Gettext has everything, it just takes knowing five languages to understand what to use for

Sharlintoday at 1:12 PM

Yeah, some sort of pluralization support is pretty much the second most important feature in any message localization tool, right after the ability to substitute externally-defined strings in the first place. Even in a monolingual application, spamming plural formatting logic in application code isn't exactly the best practice.

iririririrtoday at 2:05 PM

gettext have everything, plus a huge ecosystem like tools to coordinate collaboration from thousand of contributors etc.

if alternatives don't start with a very strong case why gettext wasn't a good option, it's already a good indicator of not-invented-here syndrome.

show 1 reply