Language class

Applies to Windows and Windows Phone

A class that provides information related to BCP-47 language tags such as the language name and the script.

Syntax

Public NotInheritable Class Language

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

Members

The Language class has these types of members:

Constructors

The Language class has these constructors.

ConstructorDescription
Language Creates a Language object.

 

Methods

The Language class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
GetExtensionSubtags Retrieves a vector of extension subtags in the current language for the given extension identified by singleton.
IsWellFormed Determines whether a BCP-47 language tag is well-formed.

 

Properties

The Language class has these properties.

PropertyAccess typeDescription

CurrentInputMethodLanguageTag

Read-onlyGets the BCP-47 language tag for the currently enabled keyboard layout or Input Method Editor (IME).

DisplayName

Read-onlyGets a localized string that is suitable for display to the user for identifying the language.

LanguageTag

Read-onlyGets the normalized BCP-47 language tag for this language.

NativeName

Read-onlyGets the name of the language in the language itself.

Script

Read-onlyGets the four-letter ISO 15924 script code of the language.

 

Remarks

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

Initialize this class with a BCP-47 language tag. For example, to work with the best current user-preferred language, pass in the top value from Windows.System.UserProfile.GlobalizationPreferences:

Examples

No code example is currently available or this language may not be supported.

Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

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

Metadata

Windows.winmd

See also

Object

 

 

Show:
© 2014 Microsoft. All rights reserved.