#google-translate #translate #free

rustlate

Really simple free google translate library for Rust

3 releases (1 stable)

1.0.0 Sep 28, 2021
0.2.0 Sep 28, 2021
0.1.0 Sep 27, 2021

#288 in Internationalization (i18n)


Used in subtitle-translator-cli

MIT license

6KB

Rustlate

Really simple free google translate library for Rust.

Example Usage(s)

use rustlate;

fn main() {
    let translator_struct = rustlate::Translator{
        to: "tr",
        from: "en"
    };


    match translator_struct.translate("hello.") {
        Ok(translated) => println!("Result: {}", translated),
        Err(_) => println!("Something went wrong...")
    }
}
use rustlate;

fn main() {
    println!("{:?}", rustlate::translate_auto("hello", "tr"));
}

Found a bug? Got an error?

  • I'm still learning Rust, so may this library can has some bugs / errors. If you found an one, please open an issue at gitlab repository.

Contributing

If you want to contribute this project:

  • Make sure you add the comments for your codes.
  • Please do not something useless.

Authors

License

This project is distributed under MIT license.

Project status

Under development.

Dependencies

~4–16MB
~213K SLoC