Platforms to show: All Mac Windows Linux Cross-Platform
Translation
Classes for on-device translation services on macOS and iOS using Apple's built-in AI frameworks.
- Classes
- class TranslationRequestMBS
- method Constructor(sourceText as String, clientIdentifier as String = "")
- property clientIdentifier as String
- property sourceText as String
- class TranslationResponseMBS
- method Constructor
- property clientIdentifier as String
- property sourceLanguage as String
- property sourceText as String
- property targetLanguage as String
- property targetText as String
- class TranslationSessionMBS
- method Cancel
- method Constructor(fromLanguageIdentifier as String, toLanguageIdentifier as String = "")
- method isReady as Boolean
- method isReady(completed as TranslationReadyCompletedMBS, Tag as Variant = nil)
- method prepareTranslation(completed as TranslationPrepareTranslationCompletedMBS, Tag as Variant = nil)
- shared method Status(FromLanguageIdentifier as String, ToLanguageIdentifier as String = "") as String
- shared method Status(FromLanguageIdentifier as String, ToLanguageIdentifier as String = "", completed as TranslationStatusCompletedMBS, Tag as Variant = nil)
- shared method StatusForText(SourceText as String, ToLanguageIdentifier as String = "") as String
- shared method StatusForText(SourceText as String, ToLanguageIdentifier as String = "", completed as TranslationStatusCompletedMBS, Tag as Variant = nil)
- shared method SupportedLanguages as String()
- shared method SupportedLanguages(completed as SupportedLanguagesCompletedMBS, Tag as Variant = nil)
- method translateBatch(Requests() as TranslationRequestMBS, completedOne as TranslateStringCompletedMBS, completed as TranslationsCompletedMBS, Tag as Variant = nil)
- method translateString(text as String) as TranslationResponseMBS
- method translateString(text as String, completed as TranslateStringCompletedMBS, Tag as Variant = nil)
- method translations(Requests() as TranslationRequestMBS) as TranslationResponseMBS()
- method translations(Requests() as TranslationRequestMBS, completed as TranslationsCompletedMBS, Tag as Variant = nil)
- shared property Available as Boolean
- property canRequestDownloads as Boolean
- property sourceLanguage as String
- property targetLanguage as String
- delegate SupportedLanguagesCompletedMBS(errorMessage as String, identifiers() as String, Tag as Variant)
- delegate TranslateStringCompletedMBS(errorMessage as String, Response as TranslationResponseMBS, Tag as Variant)
- delegate TranslationPrepareTranslationCompletedMBS(errorMessage as String, Tag as Variant)
- delegate TranslationReadyCompletedMBS(errorMessage as String, ready as Boolean, Tag as Variant)
- delegate TranslationsCompletedMBS(errorMessage as String, Responses() as TranslationResponseMBS, Tag as Variant)
- delegate TranslationStatusCompletedMBS(errorMessage as String, Status as String, Tag as Variant)
- class TranslationRequestMBS
- Examples
- Blog Entries
Release notes
- Version 26.1
- Fixed a crash with TranslationSessionMBS class for macOS 15.x.
- Version 26.0
- Added Translation classes: TranslationSessionMBS, TranslationResponseMBS and TranslationRequestMBS classes for macOS.
The items on this page are in the following plugins: MBS Swift Plugin.