Skip to content

Latest commit

 

History

History
90 lines (67 loc) · 2.68 KB

nf-bcp47mrm-getdistanceofclosestlanguageinlist.md

File metadata and controls

90 lines (67 loc) · 2.68 KB
UID tech.root title ms.date targetos description req.assembly req.construct-type req.ddi-compliance req.dll req.header req.idl req.include-header req.irql req.kmdf-ver req.lib req.max-support req.namespace req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.type-library req.umdf-ver req.unicode-ansi topic_type api_type api_location api_name f1_keywords dev_langs
NF:bcp47mrm.GetDistanceOfClosestLanguageInList
menurc
GetDistanceOfClosestLanguageInList
05/12/2021
Windows
Determines the distance between the specified language code and the closest match in a list of languages.
function
bcp47mrm.h
Windows 10 Build 17763
Windows 10 Build 17763
apiref
HeaderDef
bcp47mrm.h
GetDistanceOfClosestLanguageInList
GetDistanceOfClosestLanguageInList
bcp47mrm/GetDistanceOfClosestLanguageInList
c++

-description

Determines the distance between the specified language tag and the closest match in a list of languages.

-parameters

-param pszLanguage

Type: PCWSTR

A BCP-47 language tag that represents the candidate language.

-param pszLanguagesList

Type: PCWSTR

A character delimited list of BCP-47 language tags to compare to the candidate language. This is typically the list of user languages.

If the wchListDelimiter parameter is L'\0', then the pszLanguagesList is a double null-terminated list of language tags. Otherwise, the pszLanguagesList is a null-terminated string in which the language tags are separated by the provided delimiter.

-param wchListDelimiter

Type: wchar_t

The character used as a delimiter in the language list, or L'\0' to indicate that the language list is a double null-terminated list. The function is slightly more efficient if this parameter is L'\0'.

-param pClosestDistance

Type: double

Receives the distance between the candidate language and the closest language in the list. The value is in the range 0.0 to 1.0, where 1.0 is an exact match.

-returns

Type: HRESULT

If there is no match to any language in the list, the function returns HRESULT_FROM_WIN32(ERROR_NO_MATCH) and a distance of 0.0.

-remarks

You can use this function for localization to find the closest match to a candidate language in the list of user languages.

-see-also

IsWellFormedTag, BCP-47 language tags