TianoCore EDK2 master
|
#include "Bds.h"
Go to the source code of this file.
Macros | |
#define | ISO_639_2_ENTRY_SIZE 3 |
Functions | |
BOOLEAN | IsLangInSupportedLangCodes (IN CHAR8 *SupportedLang, IN CHAR8 *Lang, IN BOOLEAN Iso639Language) |
VOID | InitializeLangVariable (IN CHAR16 *LangName, IN CHAR8 *SupportedLang, IN CHAR8 *DefaultLang, IN BOOLEAN Iso639Language) |
VOID | InitializeLanguage (BOOLEAN LangCodesSettingRequired) |
Language settings
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Language.c.
#define ISO_639_2_ENTRY_SIZE 3 |
Definition at line 10 of file Language.c.
VOID InitializeLanguage | ( | BOOLEAN | LangCodesSettingRequired | ) |
Determine the current language that will be used based on language related EFI Variables.
LangCodesSettingRequired | - If required to set LangCodes variable |
Definition at line 155 of file Language.c.
VOID InitializeLangVariable | ( | IN CHAR16 * | LangName, |
IN CHAR8 * | SupportedLang, | ||
IN CHAR8 * | DefaultLang, | ||
IN BOOLEAN | Iso639Language | ||
) |
Initialize Lang or PlatformLang variable, if Lang or PlatformLang variable is not found, or it has been set to an unsupported value(not one of platform supported language codes), set the default language code to it.
LangName | Language name, L"Lang" or L"PlatformLang". |
SupportedLang | Platform supported language codes. |
DefaultLang | Default language code. |
Iso639Language | A bool value to signify if the handler is operated on ISO639 or RFC4646, TRUE for L"Lang" LangName or FALSE for L"PlatformLang" LangName. |
Definition at line 109 of file Language.c.
BOOLEAN IsLangInSupportedLangCodes | ( | IN CHAR8 * | SupportedLang, |
IN CHAR8 * | Lang, | ||
IN BOOLEAN | Iso639Language | ||
) |
Check if lang is in supported language codes according to language string.
This code is used to check if lang is in in supported language codes. It can handle RFC4646 and ISO639 language tags. In ISO639 language tags, take 3-characters as a delimitation to find matched string. In RFC4646 language tags, take semicolon as a delimitation to find matched string.
For example: SupportedLang = "engfraengfra" Iso639Language = TRUE Lang = "eng", the return value is "TRUE", or Lang = "chs", the return value is "FALSE". Another example: SupportedLang = "en;fr;en-US;fr-FR" Iso639Language = FALSE Lang = "en", the return value is "TRUE", or Lang = "zh", the return value is "FALSE".
SupportedLang | Platform supported language codes. |
Lang | Configured language. |
Iso639Language | A bool value to signify if the handler is operated on ISO639 or RFC4646. |
TRUE | lang is in supported language codes. |
FALSE | lang is not in supported language codes. |
Definition at line 40 of file Language.c.