Skip to main content
A newer version of this page is available. .

ITranslatorProvider Interface

Declares members implemented by classes representing translation providers, which can be used in the Localization Tool.

Namespace: DevExpress.ExpressApp.Utils

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

public interface ITranslatorProvider

Remarks

In order to create a custom translator you should create a custom translation provider class, implementing the ITranslatorProvider interface. To register a custom translation provider class, add the following code to the module’s constructor:

public sealed partial class MySolutionModule : ModuleBase {
    public MySolutionModule() {
        InitializeComponent();
        TranslatorProvider.RegisterProvider(new MyTranslationProvider());
    }
}

In this snippet, the MyTranslationProvider is the class implementing ITranslatorProvider interface.

As an alternative to implementing the ITranslatorProvider interface from scratch, you can create a descendant of the TranslationProviderBase class, which already encompasses a good deal of functionality. This class also collects localized values in blocks, to shorten the translation, based on the online translation services. You should specify the size of the block, as well as the separator symbol in the constructor of the TranslatorProviderBase class. The example of implementing such a descendant is provided in the How to: Create a Custom Translation Provider for the Localization Tool topic.

See Also