Report (RDLC) Localization/Globalization

前端 未结 1 1081
慢半拍i
慢半拍i 2021-01-02 18:20

[VS2010/ASP.NET Web Forms]

Hi,

In a report (RDLC) I need to provide localization/globalization in two languages (pt-BR and en-US) to the following elements:

相关标签:
1条回答
  • 2021-01-02 19:15

    I have had success with localizing reports by feeding in the culture I would like to display as a parameter to the report. Here is the basic outline:

    1. Setup a report parameter that represents the culture code you want to display. Let's call it pReportCulture. I set a static value as a default for "en-US"

    2. Set the Language of your report to the value of the parm : Language =Parameters!pReportCulture.Value. This should setup the culture of all textboxes etc in the report.

    3. Make sure to put a date or currency format on fields that you localize. Use the .toString("c") or other valid formats. If you do any custom text parsing you will lose the auto localization from the culture setting.

    That should take care of most the the localization display.

    0 讨论(0)
提交回复
热议问题