translator 0.0.10 copy "translator: ^0.0.10" to clipboard
translator: ^0.0.10 copied to clipboard

outdated

A free and unlimited Google Translate API for Dart. You can use it for translate strings and text for educational purpose, for other kinds of usage consider using Cloud API. Google Translate limits th [...]

example/main.dart

import 'package:translator/translator.dart';
import 'package:translator/google_translate.dart';

void main() {
  GoogleTranslator translator = new GoogleTranslator();

  String input = "Здравствуйте. Ты в порядке?";

  translator.translate(input, to: 'en')
      .then((s) =>  print("Source: " + input + "\n"
      "Translated: " + s + "\n"));


  translator.baseUrl = "https://translate.google.cn/translate_a/single";
  translator.translateAndPrint("This means 'testing' in chinese", to: 'zh-cn'); //prints 这意味着用中文'测试'

}
666
likes
0
pub points
98%
popularity

Publisher

unverified uploader

A free and unlimited Google Translate API for Dart. You can use it for translate strings and text for educational purpose, for other kinds of usage consider using Cloud API. Google Translate limits the input text to 5000 characters.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on translator