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

outdatedDart 1 only

A free Google Translate API for Dart

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 Google Translate API for Dart

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on translator