lingual 1.0.4

Free and Unlimited Language Translation (Google) API for Rust. Supports Async and Sync.
Documentation

Lingual

Provides google translation api for Rust.

Example

The crate uses reqwest to make http calls and by default uses async/await syntax.

use lingual::{Translator, Langs}
let translator = Translator::new();
let translation = translator
    .translate("Hello World", None, Some(Langs::Es))
    .await
    .unwrap();
assert_eq!("Hola Mundo", translation.text());

If you prefer to use regular sync version, simply include blocking feature in your Cargo.toml file.

lingual = {version = "1.0.0", features = ["blocking"]}
use lingual::{Translator, Langs}
let translator = Translator::new();
let translation = translator
    .translate("Hello World", None, Some(Langs::Es))
    .unwrap();
assert_eq!("Hola Mundo", translation.text());