Localization Class
Collapse the table of content
Expand the table of content

Localization Class


The Localization class defines attached properties for localization attributes and comments.

Namespace:   System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)


public static class Localization


Gets or sets which resources, such as FontFamily, are to be localized.


Gets or sets comments, which are free-form text that the markup author includes.


Gets the value of the AttributesProperty attached property from a specified element.


Gets the value of the CommentsProperty attached property from a specified element.

System_CAPS_pubmethodSystem_CAPS_staticSetAttributes(Object, String)

Sets the AttributesProperty attached property for the specified element.

System_CAPS_pubmethodSystem_CAPS_staticSetComments(Object, String)

Sets the CommentsProperty attached property to the specified element.


Identifies the Attributes attached property.


Identifies the Comments . GTMT

Markup authors may have specific requirements for elements in Extensible Application Markup Language (XAML) UI, such as constraints for text length, font family, or font size. Localizers need to know about them in order to provide consistent localization. Localization properties can be specified inside Extensible Application Markup Language (XAML), allowing authors to communicate their localization needs to localizers. These properties provide rules and hints for localization, which can be used to modify the application. There are two types of localization properties:

  • Localization attributes. The attributes specify which resources, such as FontFamily, are to be localized.

  • Localization comments. The comments are free-form text that the markup author includes.

For more information on how to use these localization properties, see Localization Attributes and Comments.

The following code example shows localization attributes and comments defined for a text block.

.NET Framework
Available since 3.0

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

Return to top
© 2015 Microsoft