Localization Class
The Localization class defines attached properties for localization attributes and comments.
Assembly: PresentationFramework (in PresentationFramework.dll)
The Localization type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Attributes | Gets or sets which resources, such as FontFamily, are to be localized. |
![]() | Comments | Gets or sets comments, which are free-form text that the markup author includes. |
| Name | Description | |
|---|---|---|
![]() ![]() | GetAttributes | Gets the value of the AttributesProperty attached property from a specified element. |
![]() ![]() | GetComments | Gets the value of the CommentsProperty attached property from a specified element. |
![]() ![]() | SetAttributes | Sets the AttributesProperty attached property for the specified element. |
![]() ![]() | SetComments | Sets the CommentsProperty attached property to the specified element. |
| Name | Description | |
|---|---|---|
![]() ![]() | AttributesProperty | Identifies the Attributes attached property. |
![]() ![]() | CommentsProperty | Identifies the Comments attached property. |
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.
<!-- Define localization attributes and comments for the text block. - The content is visible to the localizer and can be changed. - The font size property is visible to the localizer and can be changed. - The comment specifies that the trademark font size should be used. --> <TextBlock FontSize="14" Localization.Attributes= "$Content(Text Readable Modifiable) FontSize(Font Readable Modifiable)" Localization.Comments= "$Content(Trademark) FontSize(Trademark font size)" > your company name here </TextBlock>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
