July 28, 2014
Gets or sets localization/globalization language information that applies to a FrameworkElement.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<frameworkElement Language="languageString"/> -or- <frameworkElement Language="reference"/>
Dependency property identifier field: LanguageProperty
The string formats follow the RFC 3066 / ISO 639-1 standards. For example, U.S. English is "en-US". For more information about the values and format, see XmlLanguage.
is generally equivalent to the XML-defined attribute xml:lang and provides a bridge for xml:lang as found in markup into the managed API and object tree. also deliberately uses a property inheritance structure so that a value for set on the root element will propagate that value to all child objects in the visual tree. This parallels the xml:lang behavior in XML and the XML DOM.
Developing a localizable application goes considerably beyond the property and how you set it. This is particularly true for XAML..
As a best practice for most scenarios, if you set at all, you should consider one or both of the following:
Set only on the root element. (An exception to this is if you are deliberately attempting to support multiple locale conventions for text display on a single page. For example, you might be writing a translator application where separate TextBox elements have different values.)
Rather than hard-code the value with a string in XAML in individual XAML files, set it with a resource and/or a binding so that you can centralize XAML localization needs in a handful of resources or other localizable files.
Where Language Values Apply
A value (including the inherited value) for has a potential effect on the following core Windows Phone objects: PasswordBox, TextBox, TextBlock. The is used by the font subsystem to determine the default font if no specific FontFamily value is specified for these objects. For more information, see Text and fonts for Windows Phone.