xtrareports-devexpress-dot-aiintegration-dot-blazor-dot-reporting-dot-viewer-dot-extensions-dot-aireportingconfigurationbuilder-dot-addtranslation-x28-action-aitranslationconfigurationbuilder-x29.md
Activates AI-powered content translation functionality in Blazor Report Viewer.
Namespace : DevExpress.AIIntegration.Blazor.Reporting.Viewer.Extensions
Assembly : DevExpress.AIIntegration.Blazor.Reporting.Viewer.v25.2.dll
NuGet Package : DevExpress.AIIntegration.Blazor.Reporting.Viewer
public AIReportingConfigurationBuilder AddTranslation(
Action<AITranslationConfigurationBuilder> configure
)
Public Function AddTranslation(
configure As Action(Of AITranslationConfigurationBuilder)
) As AIReportingConfigurationBuilder
| Name | Type | Description |
|---|---|---|
| configure | Action<AITranslationConfigurationBuilder> |
An Action<T> delegate method that allows you to configure AI-powered content translation functionality in Blazor Report Viewer.
|
| Type | Description |
|---|---|
| AIReportingConfigurationBuilder |
An DevExpress.AIIntegration.Blazor.Reporting.Viewer.Extensions.AIReportingConfigurationBuilder object that can be used to further configure the AI-powered functionality in Blazor Report Viewer.
|
The following code activates the Translate action in the AI Operations tab and Translate and Translate Inline quick actions:
// ...
builder.Services.AddDevExpressAI((config) => {
config.AddBlazorReportingAIIntegration(cfg =>
cfg.AddTranslation(translateOptions =>
translateOptions.SetLanguages(new List<LanguageInfo> {
new LanguageInfo { Text = "German", Id = "de-DE" },
new LanguageInfo { Text = "Spanish", Id = "en-ES" }
})
.EnableTranslation()
.EnableInlineTranslation())
);
});
The following image shows Blazor Report Viewer with activated AI-powered translation functionality:
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AddTranslation(Action<AITranslationConfigurationBuilder>) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
blazor-reporting-ai-summarize-and-translate/CS/BlazorReportViewer/Program.cs#L25
config.AddBlazorReportingAIIntegration(cfg =>
cfg.AddSummarization(summarizeOptions =>
summarizeOptions.SetSummarizationMode(SummarizationMode.Abstractive))
See Also
Summarize and Translate Reports in the Blazor Report Viewer
AIReportingConfigurationBuilder Class
AIReportingConfigurationBuilder Members
DevExpress.AIIntegration.Blazor.Reporting.Viewer.Extensions Namespace