Gets or sets localization/globalization language information that applies to a FrameworkElement.
Assembly: System.Windows (in System.Windows.dll)
<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 Silverlight-based application goes considerably beyond the property and how you set it. This is particularly true for XAML. For more information, see Localizing Silverlight-based Applications.
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. See "Displaying Chinese, Japanese, and Korean Text" section in Localizing Silverlight-based Applications.
Where Language Values Apply
A value (including the inherited value) for has a potential effect on the following core Silverlight 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.
Other FrameworkElement derived classes that are not in the Silverlight core set (types not in System.Windows assembly) might also use a value to influence the behavior. For example, a control that is distributed in current or future versions of the Silverlight controls toolkit might have behavior that relies on . This might be noted in the Remarks for such a class or perhaps for specific properties of the class that are related to a behavior.
In general, Silverlight has fewer behaviors that rely on than does WPF. WPF supports influenced features such as number substitution and hyphenation that are not currently enabled in the core or SDK-distributed assemblies for Silverlight.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.