| Crates.io | es-fluent-manager-embedded |
| lib.rs | es-fluent-manager-embedded |
| version | 0.6.0 |
| created_at | 2025-10-12 21:21:09.86918+00 |
| updated_at | 2026-01-16 12:04:00.790624+00 |
| description | es-fluent manager for rust_embed |
| homepage | |
| repository | https://github.com/stayhydated/es-fluent |
| max_upload_size | |
| id | 1879734 |
| size | 30,597 |
A zero-setup, global localization manager for es-fluent.
This crate provides a "Just Works" experience for adding localization to standard Rust applications (CLIs, TUIs, desktop apps). It bundles your translations directly into the binary and provides a global singleton for access.
rust-embed under the hood).OnceLock and atomic swaps for safe concurrent access.In your crate root (lib.rs or main.rs), tell the manager to scan your assets:
// a i18n.toml file must exist in the root of the crate
es_fluent_manager_embedded::define_embedded_i18n_module!();
In your application entry point:
use es_fluent::ToFluentString;
use unic_langid::langid;
fn main() {
// 1. Initialize the global manager
es_fluent_manager_embedded::init();
// 2. Set the language (e.g., from system locale or user config)
es_fluent_manager_embedded::select_language(&langid!("en-US"));
// 3. Localize things!
let msg = MyMessage::Hello { name: "World" };
println!("{}", msg.to_fluent_string());
}
es-fluent-manager-bevy) or need strictly decoupled, dependency-injected managers.