MLKitTranslate Framework Reference

  • TranslatorOptions provides configuration for the Translator class, focusing on language settings.

  • It requires specifying the sourceLanguage for input and the desired targetLanguage for translation.

  • The primary way to create TranslatorOptions is using the designated initializer init(sourceLanguage:targetLanguage:).

  • Directly calling init() is unavailable; you must explicitly define source and target languages during initialization.

TranslatorOptions

class TranslatorOptions : NSObject

Options for Translator.