Translation performs on-device text translation across iOS, macOS, tvOS, watchOS, and visionOS, and provides SwiftUI presentation support for surfacing translated content. You use LanguageAvailability to check whether a given language pair can be translated, and drive translation requests through a TranslationSession. When a request cannot be fulfilled, the framework reports the failure as a TranslationError.
Performing Translations 1
Run on-device text translation and inspect the results of each request.
- ClTranslationSessionA class that performs translations between a pair of languages.
Checking Language Availability 1
Determine whether a given source and target language pair can be translated.
- ClLanguageAvailabilityA check for language support and status.
Handling Errors 1
Respond to failures that occur while preparing or performing a translation.
- StTranslationErrorError codes describing why the framework can't perform a translation.
Extends 3
AttributeScopesAttributeDynamicLookupView