Go to console

FirebaseMLNLTranslate Framework Reference

Functions

The following functions are available globally.

  • Returns the BCP-47 language code for the given TranslateLanguage.

    Declaration

    Objective-C

    NSString *_Nonnull FIRTranslateLanguageCodeForLanguage(
        FIRTranslateLanguage language)
  • Returns the TranslateLanguage for a given BCP-47 language code, or TranslateLanguage.Invalid if the language code is invalid or not supported by the Translate API.

    Declaration

    Objective-C

    FIRTranslateLanguage
    FIRTranslateLanguageForLanguageCode(NSString *_Nonnull languageCode)
  • Returns a set that contains TranslateLanguage codes of all languages supported by the translate API.

    Declaration

    Objective-C

    NSSet<NSNumber *> *_Nonnull FIRTranslateAllLanguages()