/* This function checks the supported languages list for a target language, This only supports RFC 4646 Languages. */
EFI_STATUS EFIAPI IsLanguageSupported(IN CONST CHAR8 *SupportedLanguages, IN CONST CHAR8 *TargetLanguage)
/* This function checks the supported languages list for a target language, This only supports RFC 4646 Languages. */
EFI_STATUS EFIAPI IsLanguageSupported(IN CONST CHAR8 *SupportedLanguages, IN CONST CHAR8 *TargetLanguage)
{
  UINTN  Index;
  while (*SupportedLanguages != 0) {
    for (Index = 0; SupportedLanguages[Index] != 0 && SupportedLanguages[Index] != ';'; Index++) {
    }
    if ((AsciiStrnCmp (SupportedLanguages, TargetLanguage, Index) == 0) && (TargetLanguage[Index] == 0)) {
      return EFI_SUCCESS;
    }
    SupportedLanguages += Index;
    for ( ; *SupportedLanguages != 0 && *SupportedLanguages == ';'; SupportedLanguages++) {
    }
  }
  return EFI_UNSUPPORTED;
}