Share via


Language.IsWellFormed(String) Method

Definition

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

public:
 static bool IsWellFormed(Platform::String ^ languageTag);
 static bool IsWellFormed(winrt::hstring const& languageTag);
public static bool IsWellFormed(string languageTag);
function isWellFormed(languageTag)
Public Shared Function IsWellFormed (languageTag As String) As Boolean

Parameters

languageTag
String

Platform::String

winrt::hstring

A BCP-47 language tag.

Returns

Boolean

bool

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. If this method returns true, an application can safely construct a language by using this tag. If it returns false, attempting to construct a language for the given tag will throw an exception.

Applies to

See also