fluent_translate 0.0.12 copy "fluent_translate: ^0.0.12" to clipboard
fluent_translate: ^0.0.12 copied to clipboard

Offline translation engine for Flutter with layered processing, dictionary/phrase management, and JSON-file based storage.

example/main.dart

// ignore_for_file: avoid_print

import 'package:fluent_translate/fluent_translate.dart';

/// Minimal example for pub.dev
/// Run with:
///   dart run example/main.dart
Future<void> main() async {
  final engine = TranslationEngine();
  await engine.initialize(customDatabasePath: './translation_data');

  final result = await engine.translate(
    'Hello, world!',
    sourceLanguage: 'en',
    targetLanguage: 'ru',
  );

  if (result.errorMessage != null && result.errorMessage!.isNotEmpty) {
    print('Error: ${result.errorMessage}');
  } else {
    print('Translated: ${result.translatedText}');
  }

  await engine.dispose();
}
0
likes
140
points
34
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Offline translation engine for Flutter with layered processing, dictionary/phrase management, and JSON-file based storage.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http, path

More

Packages that depend on fluent_translate