The fluent-rs
workspace is a collection of Rust crates implementing Project Fluent,
a localization system designed to unleash the entire expressive power of natural language translations.
This crate is a standalone solution for managing resource files and returning locale bundles.
use fluent_resmgr::resource_manager::ResourceManager;
fn main() {
let mgr = ResourceManager::new("./examples/resources/{locale}/{res_id}".into());
let bundle = mgr.get_bundle(locales, resources);
let value = bundle.format_value("hello-world", None);
assert_eq!(&value, "Hello, world!");
}
fluent-rs
is open-source, licensed under both the Apache 2.0 and MIT licenses. We
encourage everyone to take a look at our code and we'll listen to your
feedback.
We'd love to hear your thoughts on Project Fluent! Whether you're a localizer looking for a better way to express yourself in your language, or a developer trying to make your app localizable and multilingual, or a hacker looking for a project to contribute to, please do get in touch on the mailing list and the IRC channel.
- Discourse: https://discourse.mozilla.org/c/fluent
- Matrix channel: #fluent:mozilla.org