A lightweight Node.js translation module with dynamic JSON storage, supporting common __('...') syntax.
i18n-node is a lightweight translation module for Node.js that enables internationalization (i18n) in applications. It dynamically manages JSON-based language files and uses a simple `__('...')` syntax for translating strings in code and templates. The module solves the problem of adding multi-language support without heavy dependencies or complex configuration.
Node.js developers building web applications, REST APIs, or CLI tools that require multi-language support, especially those using frameworks like Express or restify.
Developers choose i18n-node for its minimal setup, familiar syntax, and dynamic JSON storage that automatically adds new phrases. It’s framework-agnostic, supports advanced features like pluralization and MessageFormat, and avoids external parsing overhead.
Lightweight simple translation module for node.js / express.js with dynamic json storage. Uses common __('...') syntax in app and templates.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically adds new translation strings to JSON files on first use, eliminating manual entry during development. This is highlighted in the README as a core feature that simplifies the workflow.
Works with any Node.js framework exposing request/response objects, not just Express, as demonstrated in examples with plain HTTP and restify. The module uses app.use() for easy integration.
Handles complex plural rules via __n() and MessageFormat with __mf(), supporting locale-specific forms like Russian's multiple plural categories, which is detailed in the API section.
Offers both singleton and instance modes for shared or isolated state, along with configurable locale detection from headers, cookies, or query parameters, as shown in the configuration examples.
Primarily relies on JSON files stored on disk, which can be inefficient for scalable or cloud-native applications requiring database-backed translations. The README admits staticCatalog disables file-related features.
Lacks integrated GUI tools for translators and advanced features like translation memory, making it less suitable for large teams compared to alternatives with broader ecosystems.
Requires explicit binding to request/response objects in non-Express frameworks, and the singleton vs. instance patterns can confuse users, as noted in the 'Usage' section warning about global scope issues.