FIRTranslateRemoteModel


@interface FIRTranslateRemoteModel : FIRRemoteModel

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 (readonly, nonatomic) FIRTranslateLanguage language;
  • Gets an instance of TranslateRemoteModel configured with the given language, the default Firebase App and the default downloading conditions. This model can be used to trigger a download by calling download(_:) API from ModelManager.

    TranslateRemoteModel uses ModelManager internally. When downloading TranslateRemoteModels, there will be a notification posted for an internal RemoteModel. When listening to the notifications for a TranslateRemoteModel you need to check the model object is a TranslateRemoteModel before using it. Otherwise you may try to use the internal RemoteModel as a TranslateRemoteModel.

    Declaration

    Objective-C

    + (nonnull FIRTranslateRemoteModel *)translateRemoteModelWithLanguage:
        (FIRTranslateLanguage)language;

    Parameters

    language

    The given language.

    Return Value

    A TranslateRemoteModel instance.

  • Gets an instance of TranslateRemoteModel configured with the given language, the given Firebase App and the given downloading conditions.

    Declaration

    Objective-C

    + (nonnull FIRTranslateRemoteModel *)
        translateRemoteModelForApp:(nonnull FIRApp *)app
                          language:(FIRTranslateLanguage)language
                        conditions:(nonnull FIRModelDownloadConditions *)conditions;

    Parameters

    app

    The Firebase app.

    language

    The given language.

    conditions

    The downloading conditions for the translate model.

    Return Value

    A TranslateRemoteModel instance.

  • UNAVAILABLE

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • UNAVAILABLE: TranslateRemoteModels cannot be initialized explicitly.

    Declaration

    Objective-C

    - (nonnull instancetype)
              initWithName:(nonnull NSString *)name
        allowsModelUpdates:(BOOL)allowsModelUpdates
         initialConditions:(nonnull FIRModelDownloadConditions *)initialConditions
          updateConditions:(nullable FIRModelDownloadConditions *)updateConditions;