Skip to main content
All docs
V25.1
  • AIReportingConfigurationBuilder.AddLocalization() Method

    Activates AI-powered report localization functionality in the Web Report Designer.

    Namespace: DevExpress.AspNetCore.Reporting

    Assembly: DevExpress.AIIntegration.AspNetCore.Reporting.v25.1.dll

    NuGet Package: DevExpress.AIIntegration.AspNetCore.Reporting

    Declaration

    public AIReportingConfigurationBuilder AddLocalization()

    Returns

    Type Description
    AIReportingConfigurationBuilder

    An AIReportingConfigurationBuilder object that can be used to further configure AI-powered functionality in Web Report Designer and Web Document Viewer.

    Remarks

    Call the AddLocalization() method to activate the AI-powered Localization functionality in the Web Report Designer:

    using Azure.AI.OpenAI;
    using Microsoft.Extensions.AI;
    using System;
    // ...
    string azureOpenAIEndpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT");
    string azureOpenAIKey = Environment.GetEnvironmentVariable("AZURE_OPENAI_API_KEY");
    string deploymentName = "MODEL_NAME"
    
    IChatClient chatClient = new AzureOpenAIClient(new Uri(azureOpenAIEndpoint),
         new System.ClientModel.ApiKeyCredential(azureOpenAIKey))
    .GetChatClient(deploymentName).AsIChatClient();
    
    builder.Services.AddSingleton(chatClient);
    builder.Services.AddDevExpressAI((config) => {
        config.AddWebReportingAIIntegration(options =>
            options.AddLocalization());
    });
    

    The Localize with AI button appears. Select a language from the Language drop-down and click the button to translate all localizable property values to the selected language:

    Web Report Designer - AI-powered Localization

    You can adjust AI-translated strings in the Localization Editor.

    See Also