fluent 0.3.1

A localization library designed to unleash the entire expressive power of natural language translations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate fluent;

use fluent::MessageContext;

fn main() {
    let mut ctx = MessageContext::new(&["en-US"]);
    ctx.add_messages("hello-world = Hello, world!");

    let value = ctx
        .get_message("hello-world")
        .and_then(|message| ctx.format(message, None));

    assert_eq!(value, Some("Hello, world!".to_string()));
}