google_mlkit_translation
1.0.3, released 8 days ago by flutter-ml.dev
Flutter plugin for Google's ML Kit On-Device Translation.
What it does
A Flutter plugin that uses Google's ML Kit On-Device Translation to dynamically translate text between more than 50 languages. It provides APIs to run translation locally on the device and manage the required language models.
AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need offline or on-device text translation between multiple languages.
- You want to avoid sending sensitive user text to a remote translation API.
Skip it when
- You need translation support on the web platform.
- You want an easy Dart-only localization solution for static app strings.
Strengths
- Performs translation entirely on-device without needing internet connectivity during runtime.
- Supports over 50 languages using native Google ML Kit APIs.
Weaknesses
- Does not support the web platform.
- Requires manual native configuration and model management.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Requires minimum iOS deployment target 15.0 with Swift Package Manager setup, linker flags (-ObjC, -all_load), and downloading MLKitTranslate_resource.bundle. Android requires minSdkVersion 21 and compileSdkVersion 36.
final onDeviceTranslator = OnDeviceTranslator(sourceLanguage: TranslateLanguage.english, targetLanguage: TranslateLanguage.spanish);
final String response = await onDeviceTranslator.translateText('Hello world');
onDeviceTranslator.close();Alternatives
Packages that do the same job and could replace google_mlkit_translation.
- intl
For static app localization and message formatting without heavy on-device machine learning models.
93Compare - flutter_localization
For built-in Flutter localization support across different locales.
82Compare
Works with
Packages commonly used together with google_mlkit_translation: ones it builds on, ones built on it, and its own family.
- google_mlkit_commonsgoogle_mlkit_translation depends on itCommon classes and utility methods for Google's ML Kit plugins
- google_mlkit_text_recognitionSame familyFlutter plugin to use Google's ML Kit Text Recognition on Android and iOS.
- google_mlkit_barcode_scanningSame familyA Flutter plugin to use Google's ML Kit Barcode Scanning on Android and iOS.
- google_mlkit_face_detectionSame familyFlutter plugin to use Google's ML Kit Face Detection on iOS and Android.
- google_mlkit_selfie_segmentationSame familyFlutter plugin to use Google's ML Kit Selfie Segmentation API.
- google_mlkit_language_idSame familyDetermine the language of a text string using Google's ML Kit.
- google_mlkit_pose_detectionSame familyFlutter plugin for Google ML Kit Pose Detection on Android and iOS.
- google_mlkit_document_scannerSame familyFlutter plugin to use Google's ML Kit document scanner API to digitize physical documents.