Export (0) Print
Expand All

Localization Class

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

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public static class Localization
public final class Localization
public final class Localization
You cannot use this managed class in XAML.

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.

NoteNote:

This type exposes two attached properties, Attributes and Comments, that do not appear in the managed reference content of this SDK release. For more information on these 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>

System.Object
  System.Windows.Localization

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft