MdePkg: UefiLib: Add a function to check if a language is supported

Add a function that checks if a target language is in the supported
languages list. Add some calls to this function where appropriate in
UefiLib.c

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Tom Zhao <tzhao@solarflare.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Tom Zhao
2019-08-20 15:08:43 +01:00
committed by Liming Gao
parent 26fc074a5f
commit ea331a5c21
2 changed files with 56 additions and 21 deletions

View File

@@ -461,6 +461,23 @@ EfiTestChildHandle (
IN CONST EFI_GUID *ProtocolGuid
);
/**
* This function checks the supported languages list for a target language,
* This only supports RFC 4646 Languages.
*
* @param SupportedLanguages The supported languages
* @param TargetLanguage The target language
*
* @return Returns EFI_SUCCESS if the language is supported,
* EFI_UNSUPPORTED otherwise
*/
EFI_STATUS
EFIAPI
IsLanguageSupported (
IN CONST CHAR8 *SupportedLanguages,
IN CONST CHAR8 *TargetLanguage
);
/**
This function looks up a Unicode string in UnicodeStringTable.