How can I translate/localizate Export dictionary ?
Hello , I am trying to localizate export dictionary. I couldnt find "key : value" в viewerObject.stringResources
Posted on:15 Jun 2021 08:21
Indeed, in the viewer's string resources there aren't key-value pairs for localizing the export options. I have converted the ticket to a Bug Report and made it public. I have also updated your Telerik points as a token of gratitude for reporting this problem.
As a workaround, you may use the fact that the Export menu list values are customizable. You may change them from the REST Service project configuration file, or from the JSON returned by the Get Available Document Formats request. Next, you may find more details on the two approaches:
For the first option, I suggest the extensions Element article. The description attribute of the extension element specifies what will the user see in the Export menu:
<Telerik.Reporting><extensions><render><extensionname="PDF"description="localized PDF Description"/></render></extensions></Telerik.Reporting>
The other option involves modification of the ReportsController. Here is a sample implementation of the virtual GetDocumentFormats method that sets custom values to the rendering extensions' description:
publicoverride HttpResponseMessage GetDocumentFormats()
var documentFormats = base.GetDocumentFormats();
var extensionsInfo = (IList<Telerik.Reporting.Services.Engine.ExtensionInfo>)(documentFormats.Content as ObjectContent<IList<Telerik.Reporting.Services.Engine.ExtensionInfo>>).Value;
foreach (var extensionInfo in extensionsInfo)
extensionInfo.LocalizedName = "my localized PDF";
extensionInfo.LocalizedName = "my localized CSV";
//...continue with the other extensions
The second approach is more flexible and overrides the values set with the first one.
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/.