Overview of typesafe-i18n features
maintypesafe-i18n is a lightweight (~1kb), fast, and type-safe internationalization library for TypeScript and JavaScript projects.
Key capabilities include:
- Type Safety: Prevents mistakes in translation keys and arguments (supports JSDoc for plain JS).
- Advanced Logic: Supports plural rules and switch-case statements (e.g., for gender-specific output).
- Formatting: Supports locale-dependent formatting for dates and numbers.
- Optimization: Supports multiple namespaces and asynchronous loading of locales.
- Environment Support: Works with frontend, backend (Node.js), and SSR (Server-Side Rendering) environments.
- Locale Detection: Includes detectors for both browser and server environments.
- Extensibility: Supports importing/exporting translations and integrates with various frameworks via adapters.
- Zero Dependencies: The library has no external dependencies.