deepl_dart 0.3.0 copy "deepl_dart: ^0.3.0" to clipboard
deepl_dart: ^0.3.0 copied to clipboard

Dart library for the DeepL language translation API.

example/deepl_dart_example.dart

import 'package:deepl_dart/deepl_dart.dart';

void main() async {
  // Construct Translator
  Translator translator = Translator(authKey: '<your_auth_key>');

  // Translate text
  TextResult result =
      await translator.translateTextSingular('Hello World', 'de');
  print(result);

  // Translate list of texts
  List<TextResult> results =
      await translator.translateTextList(['Hello World', 'Hola Mundo'], 'de');
  print(results);
}