| Crates.io | oxcomm |
| lib.rs | oxcomm |
| version | 0.1.2 |
| created_at | 2024-12-12 00:08:21.686322+00 |
| updated_at | 2024-12-12 21:07:50.049292+00 |
| description | A library for using Google Translate on the fly. |
| homepage | https://github.com/drkrssll/oxcomm |
| repository | https://github.com/drkrssll/oxcomm |
| max_upload_size | |
| id | 1480655 |
| size | 3,865 |
A basic library containing a struct that translates text using Google Translate.
use oxcomm::Translator;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let translator = Translator::new("en", "auto");
let translated_text = translator.translate("Hola").await?;
println!("{}", translated_text);
Ok(())
}