Localization
- 3 minutes to read
You can localize the Web End-User Report Designer UI and use the Report Designer to localize the reports.
Use the Localization Editor to localize a report in the Web End-User Report Designer. Review the Localize Reports article for more information.
Localize Web End-User Report Designer UI
To localize the Web End-User Report Designer UI, use the built-in localization mechanisms and substitute localization strings to change the localization. You can use any approach described below or both approaches simultaneously.
Use Satellite Resource Assemblies
You can localize the Web End-User Report Designer with the Satellite Resource Assemblies (libraries that contain translated resources).
Refer to the Localizing ASP.NET Controls via Satellite Resource Assemblies topic for more information.
Substitute Localization Strings
Note
The complete sample project How to Localize the Web Report Designer and Document Viewer Controls is available in the DevExpress Examples repository.
Use the UpdateLocalization method in the client-side ASPxClientReportDesigner.CustomizeLocalization event handler to substitute a particular localization string with the specified text.
Tip
You can use the satellite resource assemblies to translate text strings and then adjust the translation by handling the CustomizeLocalization event.
@Html.DevExpress().ReportDesigner(settings => {
settings.Name = "ReportDesigner";
settings.ClientSideEvents.CustomizeLocalization = "function(s) { " +
"s.UpdateLocalization({"+
"'Properties': 'Eigenschaften',"+
"'Data Source': 'Datenquelle',"+
"'Data Member': 'Datenelement'});}";
}).Bind(new XtraReport()).GetHtml()
Important
Localization strings are case sensitive. A string is translated if you use correct case to specify it.
On a web page localized string values may be capitalized in a different manner.
To determine the localized string whose value you wish to change, look for the UI element with the browser’s Developer Tools, as illustrated in the following picture:
Localize Reports
The Report Designer enables you to localize a report for different target languages and cultures and store localized values in the REPX file.
Tip
Review the online demo Localization Feature Tour
Use Properties Panel
Perform the following actions to localize a report:
Specify a report language other than the Default:
The Language drop-down list contains all available .NET locales. The report’s languages are highlighted in bold.
Change the controls’ property values. You can move and resize a control.
Important
When the report’s language is set to any language other than the Default language (localization mode), the Property Grid shows only localizable properties. The localization mode does not allow you to add a new control from the Toolbar or use the Report Wizard.
Save the report.
When you load a localized report, use the Language drop-down list to enable localization mode and switch to the localized version.
Use Localization Editor
The Localization Editor allows you to change text strings in the report and expedite the translation process.
You can also implement the ITranslationService interface to automatically translate all text strings displayed within the Localization Editor to the selected language.
Note
Review the Localize Reports article for more information.