Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DocumentTranslateBehavior Class

Converts the text contained in a document from one language to another while maintaining the original meaning and context.

Namespace: DevExpress.AIIntegration.WinForms

Assembly: DevExpress.AIIntegration.WinForms.v24.2.dll

NuGet Package: DevExpress.AIIntegration.WinForms

#Declaration

public class DocumentTranslateBehavior :
    DocumentBehavior<DocumentTranslateBehaviorSource>

#Remarks

Use the Languages parameter to specify target languages for text translation.

The following code snippet registers a DocumentTranslateBehavior and assigns it to the Document Viewer control:

using DevExpress.AIIntegration;
using DevExpress.AIIntegration.WinForms;
// ...
public partial class Form1 : Form {
    public Form1() {
        InitializeComponent();
            behaviorManager1.Attach<DocumentTranslateBehavior>(documentViewer1, behavior => {
                behavior.Properties.Languages = new LanguageInfo[] {
                    new LanguageInfo("de-DE"),
                    new LanguageInfo("es-ES")
                };
            });
    }
}

#Inheritance

Object
DevExpress.Utils.MVVM.BehaviorBase
DevExpress.Utils.Behaviors.Behavior
DevExpress.Utils.Behaviors.Behavior<DevExpress.AIIntegration.WinForms.DocumentTranslateBehaviorSource>
DevExpress.AIIntegration.WinForms.DocumentBehavior<DevExpress.AIIntegration.WinForms.DocumentTranslateBehaviorSource>
DocumentTranslateBehavior
See Also