Type Definitions

The following type definitions are available globally.

  • A block to invoke after ensuring that translate model files are downloaded.

    Declaration

    Objective-C

    typedef void (^FIRTranslatorDownloadModelIfNeededCallback)(NSError *_Nullable)

    Parameters

    error

    The error or nil.

  • A block containing the translation result or nil if there’s an error.

    Declaration

    Objective-C

    typedef void (^FIRTranslatorCallback)(NSString *_Nullable, NSError *_Nullable)

    Parameters

    result

    A translation result for the text or nil if there’s an error.

    error

    The error or nil.