Platforms to show: All Mac Windows Linux Cross-Platform
Back to TranslationSessionMBS class.
TranslationSessionMBS.Status(FromLanguageIdentifier as String, ToLanguageIdentifier as String = "") as String
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | Translation | MBS Swift Plugin | 26.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Waits for callback and returns result.
Returns installed, supported, unsupported, unknown or an error.
See also:
TranslationSessionMBS.Status(FromLanguageIdentifier as String, ToLanguageIdentifier as String = "", completed as TranslationStatusCompletedMBS, Tag as Variant = nil)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | Translation | MBS Swift Plugin | 26.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Use this function to check whether the system has installed the required language assets and the languages are ready to use for translation.
Note: The framework doesn't support translating from and to the same language. For example, you can't translate from English (US) to English (UK).
FromLanguageIdentifier: The source language of the content.
ToLanguageIdentifier: The target language you want to translate content into. When set to empty text, the system picks an appropriate target based on the person's preferred languages and returns the status for those languages.
Provides the availability status for a language pairing via the delegate later.
Value may be installed, supported, unsupported, unknown or an error.
The tag value is passed through to the delegate.
See also:
TranslationSessionMBS.StatusForText(SourceText as String, ToLanguageIdentifier as String = "") as String
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | Translation | MBS Swift Plugin | 26.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Waits for callback and returns result.
Returns installed, supported, unsupported, unknown or an error.
See also:
TranslationSessionMBS.StatusForText(SourceText as String, ToLanguageIdentifier as String = "", completed as TranslationStatusCompletedMBS, Tag as Variant = nil)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | Translation | MBS Swift Plugin | 26.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Use this function when you don't know the source language and want the framework to attempt a translation based on the sample text you pass in.
Pass in a string of sample text representing the language you want to translate from. When you do, the system automatically tries to detect the language of the text you pass in. If it can't, it throws a TranslationError.
If it can detect the source language of the text, it checks for necessary language asset downloads and whether they're ready for use.
Note: For best results in automatic language detection, pass in a sample string of at least 20 characters in length.
SourceText: A sample string of text representing the source language you want to translation from.
ToLanguageIdentifier: The target language you want to translate content into. When set to empty, the system picks an appropriate target based on the person's preferred languages and returns the status for those languages.
Provides the availability status for a language pairing via the delegate later.
Value may be installed, supported, unsupported, unknown or an error.
The tag value is passed through to the delegate.
See also:
TranslationSessionMBS.SupportedLanguages as String()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | Translation | MBS Swift Plugin | 26.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Waits for callback and returns result.
Currently this list contains: vi, pt, uk, it, zh-TW, ko, en-GB, de, zh, ja, id, nl, fr, th, es, tr, pl, ar-AE, ru, en, and hi.
See also:
TranslationSessionMBS.SupportedLanguages(completed as SupportedLanguagesCompletedMBS, Tag as Variant = nil)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| shared method | Translation | MBS Swift Plugin | 26.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
A language must download before it can be used in a translation.
The tag value is passed through to the delegate.
See also:
The items on this page are in the following plugins: MBS Swift Plugin.