Scenario:
We have multi-language site. This site contains a lot of reports presented in different languages. But we have problem. The report viewer, the control which shows report, is English. We need to localize this control. Can you do it?
Answer:
Yes, its so simple.
there is interface called 'IReportViewerMessages'. Via this interface you can change report viewer internal controls value as the following steps:
STEP -1:
Add a class named, for example, 'ReportViewerMessages' which implement 'IReportViewerMessages'.
STEP -2:
Create GlobalResource named 'ReportViewerResource'.
We have multi-language site. This site contains a lot of reports presented in different languages. But we have problem. The report viewer, the control which shows report, is English. We need to localize this control. Can you do it?
Answer:
Yes, its so simple.
there is interface called 'IReportViewerMessages'. Via this interface you can change report viewer internal controls value as the following steps:
STEP -1:
Add a class named, for example, 'ReportViewerMessages' which implement 'IReportViewerMessages'.
STEP -2:
Create GlobalResource named 'ReportViewerResource'.

STEP- 3:
Add the following line to your web.config:
<add key="ReportViewerMessages" value="YourClass, YourAssembly" />
Build and run your project and the result will be like the following:
Nice article, but to which section we should add
ReplyDeleteif you mean the web.config part, under appSettings
DeleteThere's also a second and third interface with some more fields and methods for translating. See: http://devillers.nl/localizing-microsoft-reportviewer/
ReplyDeleteThank you @Martin, nice voice.
ReplyDelete