/* This function returns the number of supported languages on HiiHandle. */
UINT16 EFIAPI GetSupportedLanguageNumber(IN EFI_HII_HANDLE HiiHandle)
/* This function returns the number of supported languages on HiiHandle. */
UINT16 EFIAPI GetSupportedLanguageNumber(IN EFI_HII_HANDLE HiiHandle)
{
  CHAR8   *Lang;
  CHAR8   *Languages;
  CHAR8   *LanguageString;
  UINT16  LangNumber;
  Languages = HiiGetSupportedLanguages (HiiHandle);
  if (Languages == NULL) {
    return 0;
  }
  LangNumber = 0;
  Lang       = AllocatePool (AsciiStrSize (Languages));
  if (Lang != NULL) {
    LanguageString = Languages;
    while (*LanguageString != 0) {
      GetNextLanguage (&LanguageString, Lang);
      LangNumber++;
    }
    FreePool (Lang);
  }
  FreePool (Languages);
  return LangNumber;
}