Lingual
Provides google translation api for Rust.
Example
The crate uses reqwest to make http calls and by default uses async/await syntax.
use
let translator = new;
let translation = translator
.translate
.await
.unwrap;
assert_eq!;
If you prefer to use regular sync version, simply include blocking feature in your Cargo.toml file.
= { = "1.0.0", = ["blocking"]}
use
let translator = new;
let translation = translator
.translate
.unwrap;
assert_eq!;
Features
wasm- allows the crate to be used in wasm environment - only supports async/await syntax.sea-orm- support for conversion between db types and rust types from sea-orm.blocking- uses blocking api (non async/await syntax) for fetching the translations.non-blocking- default - use async/await syntaxaccurate- limits the number langs supported to the ones with higher level accuracy
Roadmap
- Support for async/await syntax
- Support for blocking api
- Support for wasm
- [] Support for DeepL api (Will be worked on later)
- [] blocking
- [] async/await