Platforms to show: All Mac Windows Linux Cross-Platform

TranslationSessionMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Translation MBS Swift Plugin 26.0 ✅ Yes ❌ No ❌ No ✅ Yes All
The class for a translation session.
Example
Var session as new TranslationSessionMBS("en", "de")
Var Translation as TranslationResponseMBS = session.translateString("Hello World")
MessageBox "Translation of Hello World to German: "+Translation.targetText

Requires macOS or iOS in version 26. Or for older code path the macOS 15 and iOS 18 versions.

You can use NSLinguisticTaggerMBS class to detect which language a text has.

Languages

Constant Value Description
LanguageArabicUAE "ar-AE" Arabic (United Arab Emirates)
LanguageChinese "zh" Chinese
LanguageChineseTraditional "zh-TW" Traditional Chinese
LanguageDutch "nl" Dutch
LanguageEnglish "en" English
LanguageEnglishUK "en-GB" English (United Kingdom)
LanguageFrench "fr" French
LanguageGerman "de" German
LanguageHindi "hi" Hindi
LanguageIndonesian "id" Indonesian
LanguageItalian "it" Italian
LanguageJapanese "ja" Japanese
LanguageKorean "ko" Korean
LanguagePolish "pl" Polish
LanguagePortuguese "pt" Portuguese
LanguageRussian "ru" Russian
LanguageSpanish "es" Spanish
LanguageThai "th" Thai
LanguageTurkish "tr" Turkish
LanguageUkrainian "uk" Ukrainian
LanguageVietnamese "vi" Vietnamese

This class has no sub classes.

Blog Entries

Release notes

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS Swift Plugin.


TranslationResponseMBS   -   TwainIdentityMBS


The biggest plugin in space...