Back to Devexpress

ModuleBase.GetXafResourceLocalizerTypes() Method

expressappframework-devexpress-dot-expressapp-dot-modulebase-161deb37.md

latest2.9 KB
Original Source

ModuleBase.GetXafResourceLocalizerTypes() Method

Returns a collection of Resource Localizer types that can be used in an application that uses the current module.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public virtual ICollection<Type> GetXafResourceLocalizerTypes()
vb
Public Overridable Function GetXafResourceLocalizerTypes As ICollection(Of Type)

Returns

TypeDescription
ICollection<Type>

An ICollection<Type> collection containing the types of the Resource Localizers to be supplied with the current module.

|

Remarks

Each Developer Express component or library has a specific Localizer class (see the table below) that provides localized strings for this component/library. If your distributable module uses a control from one of the DevExpress libraries, you can supply a Resource Localizer with the module. In this instance, the control’s resources can be localized via the IModelLocalization node in the Model Editor in any application that uses your module. To introduce a Resource Localizer, inherit it from a corresponding Localizer class and implement the IXafResourceLocalizer interface. All the necessary DevExpress localizers are listed in the Localizing WinForms Controls via Localizer Objects document. To learn how to implement the IXafResourceLocalizer interface, see the XAF sources.

To register a custom Resource Localizer in your module, override the GetXafResourceLocalizerTypes method. See an example:

csharp
public class Module : ModuleBase {
   public override ICollection<Type> GetXafResourceLocalizerTypes() {
     ICollection<Type> result = new List<Type>();
      result.Add(typeof(GridControlLocalizer));
      result.Add(typeof(LayoutControlLocalizer));
      return result;
   }
   //...
}

See Also

ModuleBase Class

ModuleBase Members

DevExpress.ExpressApp Namespace