TechnologiesMachine Learning & AI

Translation

iOSmacOStvOSwatchOSvisionOS

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.

  • Cl
    TranslationSession
    A 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.

  • Cl
    LanguageAvailability
    A check for language support and status.

Handling Errors 1

Respond to failures that occur while preparing or performing a translation.

  • St
    TranslationError
    Error codes describing why the framework can't perform a translation.

Extends 3

AttributeScopesAttributeDynamicLookupView
← Machine Learning & AI