Node.js Gettext Localization Library
JSON →node-gettext is a comprehensive JavaScript implementation of a significant subset of the GNU gettext localization framework, designed for both server-side Node.js and client-side browser environments, making it an isomorphic solution. Currently at version 3.0.1, the library focuses exclusively on string and phrase translation, omitting categories like LC_NUMERIC or LC_MONETARY found in the full GNU gettext specification, as it assumes the LC_MESSAGES category at all times. It supports core gettext features such as domains, contexts, and plural forms, and ships with pluralization rules for 136 languages. A key differentiator is that developers are responsible for loading translation files (e.g., .mo, .po, .json via gettext-parser) and providing them to the instance, rather than the library automatically reading from the file system. The library provides useful error messages when debug is enabled and emits events for internal issues, such as missing translations.
Traffic · last 30 days ↑150% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany