reword 0.1.1

A fast and safe translation generator.


Travis Appveyor Docs

A fast and safe translation generator.


Add this to Cargo.toml:

reword = "0.1"

And this to

extern crate reword;

reword! {
    enum Lang {
        Hi {
            EN_UK | EN_US = "Hi";
            NO = "Hei";
        HowAreYou {
            EN_UK = "How are you?";
            EN_US = "How you doing?";
            NO = "Hvordan går det?";

fn main() {
    let mut lang = Lang::NO;
    assert_eq!(lang.reword::<Hi>(), "Hei");

    lang = Lang::EN_UK;
    assert_eq!(lang.reword::<HowAreYou>(), "How are you?");

    lang = Lang::EN_US;
    assert_eq!(lang.reword::<HowAreYou>(), "How you doing?");


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.