Export (0) Print
Expand All

Localizing Plugins

Writer plugins can be localized for a variety of international markets using the .NET Frameworks built-in globalization capabilities. More information about these capabilities is available at Developing World-Ready Applications.

By default, the display name, description, menu text, and sidebar text for Writer plugins are specified using .NET attributes (e.g. WriterPluginAttribute Class, InsertableContentSourceAttribute Class, etc.). However when using this method the text values are hard-coded into the plugin type’s metadata, and therefore not easily localizable.

In order to overcome this limitation, Writer also provides an alternative mechanism for specifying these values using .NET resource files. When loading a plugin, Writer will look for a resource file associated with the plugins Type. Within this resource file Writer will look for following string values and use them in preference to the values contained within the corresponding attributes:

  • WriterPlugin.Name
  • WriterPlugin.Description
  • InsertableContentSource.MenuText
  • InsertableContentSource.SidebarText
  • UrlContentSource.ProgressCaption
  • UrlContentSource.ProgressMessage
  • LiveClipboardContentSource.<Name>.Name
  • LiveClipboardContentSource.<Name>.Description

Even if you provide localized resources, the appropriate attributes and values should still be included within attributes (for backward compatibility with earlier betas and also because the attributes contain other information that’s not reflected in the resources). If the resourced string is not found, the hard-coded attribute values are used as a default.

Show:
© 2014 Microsoft