As you may already know, our upcoming release (v20.1) includes built-in support for report content localization. You and your users can now quickly translate reports in both desktop and web applications and transfer culture-related settings with your report layout. New Localization related features include:
Reports localization support for the DevExpress End-User Report Designer across all supported platforms.
Reports localization support within our Visual Studio Report Designer.
Built-in Localization Editor to help you populate our new
XtraReport.LocalizationItems
collection. This collection stores localized strings and other culture-related settings. It is always serialized alongside your report layout.Our End-User Report Designers can use a culture specified in a report’s internal
Language
property and ignore an application’s regional settings when generating a report’s print preview. This allows users to validate report rendering as if it was localized.Use the
XtraReport.ApplyLocalization
method to change a report’s language at runtime. You can create a report parameter to help manage language settings - as illustrated in the following image
Now, handle the XtraReport.BeforePrint
event to call the XtraReport.ApplyLocalization
method and pass the parameter value to it:
private void XtraReport_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e) {
ApplyLocalization(language.Value.ToString());
}
Once complete, your users will be able to switch parameters and view localized reports within the document viewer:
I’ll stop here and encourage you to visit our YouTube channel to learn more about our new Localization Editor.
You can download the video’s script using the following URL: Report Localization Video Script.
As always, we welcome your thoughts. Please comment below and let us know what you think of this new feature.