MLKitTranslate Framework Reference

MLKTranslateRemoteModel


@interface MLKTranslateRemoteModel : MLKRemoteModel

A translate model that is stored remotely on the server and downloaded on the device.

  • The language associated with this model.

    Declaration

    Objective-C

    @property (nonatomic, readonly) MLKTranslateLanguage _Nonnull language;
  • Gets an instance of TranslateRemoteModel configured with the given language. This model can be used to trigger a download by calling download(_:) API from ModelManager.

    TranslateRemoteModel uses ModelManager internally. When downloading a TranslateRemoteModel, there will be a notification posted for a RemoteModel. To verify if such notifications belong to a TranslateRemoteModel, check that the ModelDownloadUserInfoKeyRemoteModel field in the user info dictionary contains an object of type TranslateRemoteModel. Please do not instantiate with TranslateLanguage.english given it is built-in. Otherwise such instance cannot be downloaded or deleted.

    Declaration

    Objective-C

    + (nonnull MLKTranslateRemoteModel *)translateRemoteModelWithLanguage:
        (nonnull MLKTranslateLanguage)language;

    Parameters

    language

    The given language.

    Return Value

    A TranslateRemoteModel instance.

  • Unavailable. Use translateRemoteModel(language:) instead.

    Declaration

    Objective-C

    - (nonnull instancetype)init;