internationalizationi18nextjquery-globalize

Globalize.js vs i18next.js


Does Globalize.js offer anything over i18next.js? I've been using i18next.js and I can't find a comparison of the two technologies. Are there any advantages to one over the other? Or, is this just another jQuery project sold on the jQuery name?


Solution

  • Short answer:

    1. Globalize has additional functionality: i18next seems to offer message formatting only. Globalize offers message formatting, date formatting (e.g., 11/30/2010 in English, 30/11/2010 in Portuguese, Nov 30, 2010, 5:55:00 PM in English, 30 nov. 2010 17:55:00 in Spanish, ٣٠‏/١١‏/٢٠١٠ ٥:٥٥:٠٠ م in Arabic, etc), number formatting (e.g., 3.142 in English, 3,142 in Spanish, ٣٫١٤٢ in Arabic, ৩.১৪২ in Bengali, etc), currency formatting (e.g., €9.99 in English, 9,99 € in German, etc), relative time formatting (e.g., tomorrow, mañana, 明天, غدًا, in 3 months, etc), unit formatting (e.g., 10 seconds, 10 segundos, 10秒钟, ١٠ ثوان, etc).
    2. Considering message formatting (which both libraries support), Globalize supports pre-compiling your formatters during build time for faster and smaller runtime code.
    3. Globalize.js is used at scale at Twitter (mobile site) for example.

    Longer answer:

    I didn't know of i18nnext.js (and haven't used it myself), so I cannot list the differences precisely, but by looking at its docs in a glance it seems i18nnext is only about message formatting, therefore it doesn't support number formatting, date formatting, currency formatting, unit formatting, and relative time formatting. Nor parsing. Globalize supports those.

    Potential interesting reading:

    Just let me know if you have any questions.