init(installedSource:target:preferredStrategy:)
Creates a translation session to translate between a given source and target language already installed on device.
Declaration
convenience init(installedSource source: Locale.Language, target: Locale.Language?, preferredStrategy: TranslationSession.Strategy)Parameters
- preferredStrategy:
The translation approach to use. Highfidelity uses Apple Intelligence models when available on device, or falls back to Lowlatency when those models aren’t available. The
lowLatencystrategy uses traditional models for translation.
Discussion
If one or both languages aren’t installed on the device, attempting to translate will throw errors. To get the person’s permission to download languages that aren’t already installed, translate using a TranslationSession provided by translationTask(_:action:) or translationTask(source:target:action:) .