Language Language Language Language Language Class


Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Prerelease APIs are identified by a Prerelease label.

[Contains prerelease APIs.]
A class that provides information related to BCP-47 language tags such as the language name and the script.

public : sealed class Language : ILanguage, ILanguageExtensionSubtags
struct winrt::Windows::Globalization::Language : ILanguage, ILanguageExtensionSubtags
public sealed class Language : ILanguage, ILanguageExtensionSubtags
Public NotInheritable Class Language Implements ILanguage, ILanguageExtensionSubtags
var language = new language(languageTag);
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


// Get the top user-preferred language and its display name.
var topUserLanguage = Windows.System.UserProfile.GlobalizationPreferences.languages[0];
var language = new Windows.Globalization.Language(topUserLanguage);
var displayName = language.displayName;
// Get the top user-preferred language and its display name.
var topUserLanguage = Windows.System.UserProfile.GlobalizationPreferences.Languages[0];
var language = new Windows.Globalization.Language(topUserLanguage);
var displayName = language.DisplayName;


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.

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:

Starting in : Language tags support the Unicode extensions "ca-" and "nu-". (See Unicode Key/Type Definitions.) Note that these extensions can affect the numeral system or calendar used by globalization objects.


Language(String) Language(String) Language(String) Language(String) Language(String)

Creates a Language object.


CurrentInputMethodLanguageTag CurrentInputMethodLanguageTag CurrentInputMethodLanguageTag CurrentInputMethodLanguageTag CurrentInputMethodLanguageTag

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

DisplayName DisplayName DisplayName DisplayName DisplayName

Gets a localized string that is suitable for display to the user for identifying the language.

LanguageTag LanguageTag LanguageTag LanguageTag LanguageTag

Gets the normalized BCP-47 language tag for this language.

LayoutDirection LayoutDirection LayoutDirection LayoutDirection LayoutDirection

Prerelease. Gets the content layout direction (for text and UI elements) most appropriate for a language.

NativeName NativeName NativeName NativeName NativeName

Gets the name of the language in the language itself.

Script Script Script Script Script

Gets the four-letter ISO 15924 script code of the language.


GetExtensionSubtags(String) GetExtensionSubtags(String) GetExtensionSubtags(String) GetExtensionSubtags(String) GetExtensionSubtags(String)

Retrieves a vector of extension subtags in the current language for the given extension identified by singleton.

IsWellFormed(String) IsWellFormed(String) IsWellFormed(String) IsWellFormed(String) IsWellFormed(String)

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

TrySetInputMethodLanguageTag(String) TrySetInputMethodLanguageTag(String) TrySetInputMethodLanguageTag(String) TrySetInputMethodLanguageTag(String) TrySetInputMethodLanguageTag(String)

Tries to set the normalized BCP-47 language tag of this language.

See Also