MessageTranslationService
Service interface for translating chat messages on-device.
Google flavor provides an ML Kit implementation; fdroid/desktop/iOS provide a no-op that returns TranslationResult.Unavailable, which hides the translate action entirely.
Inheritors
Functions
Link copied to clipboard
Download the translation models for the given language tags. Only meaningful on google flavor.
Link copied to clipboard
Check whether translating into the given locale is possible on this platform (model downloadable).
Link copied to clipboard
Translate plain chat text to the target locale, detecting the source language on-device. Never downloads language models — missing models are reported as TranslationResult.ModelDownloadRequired so the UI can ask the user before pulling ~30MB per language.