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 callingdownload(_:)
API fromModelManager
.TranslateRemoteModel
usesModelManager
internally. When downloading aTranslateRemoteModel
, there will be a notification posted for aRemoteModel
. To verify if such notifications belong to aTranslateRemoteModel
, check that theModelDownloadUserInfoKeyRemoteModel
field in the user info dictionary contains an object of typeTranslateRemoteModel
. Please do not instantiate withTranslateLanguage.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;