#translate #yandex #google #en #de #es #fr

translate_core

This crate implements Google Traduction and Yandex API in rust without any key needed (so free but limited to 5000 caracters) docs: https://docs.rs/translate_core

4 releases

0.1.21 Jan 17, 2019
0.1.2 Jan 16, 2019
0.1.1 Jan 16, 2019
0.1.0 Jan 16, 2019

#5 in #fr

24 downloads per month

MIT license

11KB
213 lines

Translate is the first translation crate in Rust This crate is based on Google and Yandex translators The langage detection is also supported

Requirements:

  • An internet connection
  • OpenSSL

Warning:

  • This crate use reqwest

Functionnalities:

  • Langage detection (supports: [EN,DE,FR,ES,IT,NL,RU])
  • Translation (supports: [EN,DE,FR,ES,IT,NL,RU])

Examples:

use translate_core::*;
translate(google(),"This is an test for the translation".to_string(),Langage::EN,Langage::FR,|result| {
    println!("{}",result.unwrap());
});
use translate_core::*;
detect(yandex(),"This is an test for the detection".to_string(),|result| {
    println!("{}",result.unwrap());
});

Dependencies

~20MB
~435K SLoC