How to localize export button related popup content?

1 Answer 33 Views
Report Viewer - Angular Report Viewer - HTML5 Report Viewer - MVC Report Viewer - WPF
amol
Top achievements
Rank 1
Iron
amol asked on 30 Jul 2021, 06:03 AM

Hello All,

How can we localize the below menu from UI side. It is related to report viewer

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 03 Aug 2021, 02:22 PM

Hello Amol,

Basically, the recommended approach is by setting the extension description in the configuration file of the REST service project. For example, for .NET Core project, you can use the following example:

"telerikReporting": {
  "extensions": [
    {
      "name": "PDF",
      "description": "PDF Customized"
      
    }
  ]
}

You can also take a look at the extensions Element example section

As a workaround, you may test customizing the export formats descriptions in the ReportsController.  You will need to add an override of the GetdocumentInfo. For example the following code will change the CSV description:

public override IActionResult GetDocumentInfo(string clientID, string instanceID, string documentID)
{
    var result = (JsonResult)base.GetDocumentInfo(clientID, instanceID, documentID);
    var resultValue = result.Value;
    var prop = resultValue.GetType().GetProperty("RenderingExtensions");
    var extensionInfos = (ExtensionInfo[])prop.GetValue(resultValue);
    if (extensionInfos != null)
    {
        extensionInfos[0].LocalizedName = "My Name";
    }
    return result;
}

Please, give these options a try and let me know how it goes. If they do not work for you, please, provide us more details about your scenario and project.

 

Regards,
Neli
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tags
Report Viewer - Angular Report Viewer - HTML5 Report Viewer - MVC Report Viewer - WPF
Asked by
amol
Top achievements
Rank 1
Iron
Answers by
Neli
Telerik team
Share this question
or