| Crates.io | reinhardt-i18n |
| lib.rs | reinhardt-i18n |
| version | 0.1.0-alpha.2 |
| created_at | 2026-01-23 10:38:47.713172+00 |
| updated_at | 2026-01-23 10:57:06.833945+00 |
| description | Internationalization and localization support |
| homepage | |
| repository | https://github.com/kent8192/reinhardt-web |
| max_upload_size | |
| id | 2064065 |
| size | 260,517 |
Internationalization and localization support for Reinhardt, inspired by Django's i18n framework.
Framework for translating applications into multiple languages with Django-style gettext API.
Add reinhardt to your Cargo.toml:
[dependencies]
reinhardt = { version = "0.1.0-alpha.1", features = ["i18n"] }
# Or use a preset:
# reinhardt = { version = "0.1.0-alpha.1", features = ["standard"] } # Recommended
# reinhardt = { version = "0.1.0-alpha.1", features = ["full"] } # All features
Then import i18n features:
use reinhardt::i18n::{gettext, ngettext, pgettext};
use reinhardt::i18n::{activate, deactivate, MessageCatalog};
Note: I18n features are included in the standard and full feature presets.
gettext): Basic message translation with fallback supportgettext_lazy): Deferred translation evaluation for compile-time definitionsngettext): Language-aware plural form handlingngettext_lazy): Deferred plural translation evaluationpgettext): Disambiguate translations with context (e.g., "File" as menu vs. verb)npgettext): Context-aware plural form handlingactivate): Set active locale with associated catalogdeactivate): Revert to default English localeget_locale): Retrieve currently active locale