다음을 통해 공유


xml:lang Handling in XAML

xml:lang is an XML defined attribute that declares the language and culture information for an object element.

XAML Attribute Usage

<object xml:lang="rfc3066lang" />

XAML Values

rfc3066lang

A string derived from the RFC 3066 standard that identifies either a language, or a language-region with language and region separated by a single hyphen. See XmlLanguage for more information on the values and format.

Remarks

The definition for the xml:lang attribute in XAML is derived from xml:lang as defined as a "special attribute" by World Wide Web Consortium (W3C) for XML. Language and culture information is potentially processed in different ways by elements depending on their implementations, but there is no default XAML processing of the xml:lang attribute.

The default value of the xml:lang attribute is an empty string at the attribute level.

The xml:lang attribute effects and the value of the attribute are scoped to child elements.

For elements that are derived classes of FrameworkElement or FrameworkContentElement, you can use the equivalent Language dependency property rather than the xml:lang attribute. The Language property will default to "en-US" if not otherwise set either through the property itself or through processing the xml:lang attribute.

See Also

Concepts

Globalization for the Windows Presentation Foundation