translate 1.0.0 copy "translate: ^1.0.0" to clipboard
translate: ^1.0.0 copied to clipboard

A simple to use Dart package, for translating text using Yandex.Translate API

example/example.dart

import 'dart:io';

import 'package:translate/translate.dart';

main() {
  /*
  Languages('api_key')
      .fetch()
      .then(
        (data) => print(data),
        onError: (e) => print(e),
      ).then((val) => exit(0));
  */
  /*
  DetectIt('api_key')
      .detect('Hello World', hint: [
        'en',
        'de',
        'ru',
        'hi',
      ]) // hints are to be prioritized by platform while detecting language, if provided
      .then(
        (data) => print(data),
        onError: (e) => print(e),
      )
      .then((val) => exit(0));
  */
  TranslateIt('api_key')
      .translate(
          '<!DOCTYPE html><html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>',
          'ru',
          type: 'html')
      .then(
        (data) => print(data),
        onError: (e) => print(e),
      )
      .then((val) => exit(0));
}
11
likes
40
pub points
57%
popularity

Publisher

verified publisheritzmeanjan.in

A simple to use Dart package, for translating text using Yandex.Translate API

Repository
View/report issues

License

MIT (LICENSE)

More

Packages that depend on translate