Export (0) Print
Expand All

XmlLanguage Class

Represents a language tag for use in XML and Extensible Application Markup Language (XAML) markup.

Namespace:  System.Windows.Markup
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml

[TypeConverterAttribute(typeof(XmlLanguageConverter))]
public class XmlLanguage
<object property="prefix"/>
- or -
<object property="prefix-subcode"/>

XAML Values

prefix

Language prefix, using the ISO 639-1 language prefix values. For example "en", or "zh". Uppercase values are accepted and converted to lowercase. This may also be an empty attribute, "".

subcode

If provided, must be preceded by a single hyphen. Then, a subcode as defined by RFC 3066. The most typical usage, and the one which is most likely to properly map to a CultureInfo, is a country or regional designation such as "-us" or "-hk". Uppercase values are accepted and converted to lowercase.

The language tag may or may not have a registered CultureInfo present on the system where the XML is interpreted.

This class is useful for dealing with values represented using xml:lang in XML.

Language tags can be specified in two-character form or in a hyphenated language-locale form. See RFC 3066.

Note that the XML specification allows the empty string for xml:lang, although that is not permitted by RFC 3066; therefore, the type permits "" (empty attribute string). A default-constructed XmlLanguage behaves as if constructed with "" (empty string).

System.Object
  System.Windows.Markup.XmlLanguage

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2014 Microsoft