translate 0.1.0

Projet de test (translate)
Documentation
#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {
        assert_eq!(2 + 2, 4);
    }
}

pub fn tr(index: usize, lang: String) -> String {
    let fr = ["bonjour", "tout", "le monde"];
    let en = ["hello", "all", "the world"];

    if index >= fr.len() {
        return String::from("Not Found");
    }

    if lang == "fr" {
        String::from(fr[index])
    } else {
        String::from(en[index])
    }
}