TextElement.Language Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the language of the content within an TextElement element.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<textElement Language="xmlLanguageStr" ... />
XAML Values
xmlLanguageStr |
"prefix" - or - "prefix-subcode" |
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 equivalent to lowercase. |
To specify a Language value in XAML, you specify a string that represents the same string you would use in a call to GetLanguage.
Property Value
Type: System.Windows.Markup.XmlLanguageA value of type XmlLanguage. The default is a XmlLanguage value created with the string en-US (IetfLanguageTag is "en-US").
Dependency property identifier field: LanguageProperty
Language is generally equivalent to the XML-defined attribute xml:lang. See Remarks for FrameworkElement.Language.