Language.IsWellFormed | isWellFormed method

Applies to Windows and Windows Phone

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

Syntax


var boolean = Windows.Globalization.Language.isWellFormed(languageTag);

Parameters

languageTag

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

A BCP-47 language tag.

Return value

Type: Boolean [JavaScript] | System.Boolean [.NET] | Platform::Boolean [C++]

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.

Remarks

If your app passes language tags used in this class to any National Language Support functions, it must first convert the tags by calling ResolveLocaleName.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Globalization
Windows::Globalization [C++]

Metadata

Windows.winmd

See also

Language
BCP-47 language tags

 

 

Show:
© 2014 Microsoft