Go to console

FirebaseMLNLLanguageID Framework Reference

Type Definitions

The following type definitions are available globally.

  • A block that handles a language identification result.

    Declaration

    Objective-C

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

    Parameters

    languageCode

    The identified language code for the text, FIRMLKitUndeterminedLanguageCode if no language was identified or nil if there was an error.

    error

    The error or nil.

  • A block that handles the result of identifying possible languages.

    Declaration

    Objective-C

    typedef void (^FIRIdentifyPossibleLanguagesCallback)(
        NSArray<FIRIdentifiedLanguage *> *_Nullable, NSError *_Nullable)

    Parameters

    identifiedLanguages

    The list of identified languages for the text (which may be a list with a single element if no languages were identified: a language code FIRMLKitUndeterminedLanguageCode with confidence 1), or nil in case of an error.

    error

    The error or nil.