/* This function supports both ISO 639-2 and RFC 4646 language codes, but language code types may not be mixed in a single call to this function. */
CHAR8* DriverHealthManagerSelectBestLanguage(IN CHAR8 *SupportedLanguages, IN BOOLEAN Iso639Language)
/* This function supports both ISO 639-2 and RFC 4646 language codes, but language code types may not be mixed in a single call to this function. */
CHAR8* DriverHealthManagerSelectBestLanguage(IN CHAR8 *SupportedLanguages, IN BOOLEAN Iso639Language)
{
  CHAR8  *LanguageVariable;
  CHAR8  *BestLanguage;
  GetEfiGlobalVariable2 (Iso639Language ? L"Lang" : L"PlatformLang", (VOID **)&LanguageVariable, NULL);
  BestLanguage = GetBestLanguage (
                   SupportedLanguages,
                   Iso639Language,
                   (LanguageVariable != NULL) ? LanguageVariable : "",
                   Iso639Language ? "eng" : "en-US",
                   NULL
                   );
  if (LanguageVariable != NULL) {
    FreePool (LanguageVariable);
  }
  return BestLanguage;
}