Вопрос

I am making a windows form application using Visual Studio 2010.

I am using ReportViewer tool to show my RDLC report. The header of the toolbar is coming in English no matter what the currentUI or the current culture is as I am also Explicitly setting it as French but still its coming only in English, I am trying to display the toolbar according to the region of the Destination computer in which my application will run.

Till now I have add these lines to set the cultures explicitly during the loading of my windows form.

Thread.CurrentThread.CurrentUICulture = new CultureInfo("fr-FR"); Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");

and tested it using

MessageBox.Show(CultureInfo.CurrentUICulture.ToString()); MessageBox.Show(CultureInfo.CurrentUICulture.ToString());

which provide me with the outcome (fr-FR).

Any assistance or guidance will be very helpful thank you.

Это было полезно?

Решение

You need to have the ReportViewer Language Pack (this is probably the version you need Microsoft Report Viewer Redistributable 2010 Language Pack).

Also have a look at How to localize the ReportViewer control in ASP.NET 2.0 as it provides more information of localizing the report viewer.

Perhaps this article can also help you: Customizing and Localizing Microsoft ReportViewer .NET - An exact solution.

Другие советы

On Windows Forms you can install the correct language pack on every client that uses your application (i.e.: link to italian language pack).

On ASP.NET you can implement the IReportViewerMessages2 interface to provide custom localization of the ReportViewer control user interface.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top