IsWellFormedTag function (bcp47mrm.h)

Determines whether a BCP-47 language tag is well-formed.

Syntax

bool IsWellFormedTag(
  PCWSTR pszTag
);

Parameters

pszTag

Type: PCWSTR

A BCP-47 language tag.

Return value

true if the language tag is well-formed as defined by BCP-47, except when the language tag can never be valid according to BCP-47. Otherwise it returns false.

Remarks

If this function returns true, an application can safely construct a Windows Runtime Language by using this tag. If it returns false, attempting to construct a Language for the given tag will throw an exception.

Requirements

Requirement Value
Minimum supported client Windows 10 Build 17763
Minimum supported server Windows 10 Build 17763
Header bcp47mrm.h

See also

BCP-47 language tags