MLKitTranslate Framework Reference

  • ML Kit Translate provides classes for managing models, translating text, and configuring translation options.

  • ModelManager handles models used by ML Kit features, including remote models stored on the server.

  • Translator is the core class for translating text, while TranslatorOptions allows for customization.

  • TranslateRemoteModel is a specialized remote model for translation tasks, inheriting from RemoteModel.

Classes

The following classes are available globally.

  • Manages models that are used by MLKit features.

    Declaration

    Swift

    class ModelManager : NSObject
  • A model that is stored remotely on the server and downloaded to the device.

    Declaration

    Swift

    class RemoteModel : NSObject
  • A translate model that is stored remotely on the server and downloaded on the device.

    Declaration

    Swift

    class TranslateRemoteModel : RemoteModel
  • A class that translates the given input text.

    Declaration

    Swift

    class Translator : NSObject
  • Options for Translator.

    Declaration

    Swift

    class TranslatorOptions : NSObject