Skip to content

Commit f25972c

Browse files
NickVolynkinAbadzhevdmitry-eliseev-devexpressalbertov05
committed
readme: Explain example purpose and restructure
- Explain the localization mechanism in more detail. - Add screenshots of localized Report Designer and Report viewer. - Add links to documentation - Give an overview of files with relevant code Signed-off-by: Nick Volynkin <nikolay.volynkin@devexpress.com> Co-authored-by: Vladimir Abadzhev <vladimira@devexpress.com> Co-authored-by: Dmitry Eliseev <dmitry.eliseev@devexpress.com> Co-authored-by: Albert Totten <49917542+albertov05@users.noreply.github.com>
1 parent 7d93aba commit f25972c

4 files changed

Lines changed: 75 additions & 8 deletions

File tree

README.md

Lines changed: 75 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,88 @@
11
<!-- default badges list -->
22
![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/1048527919/25.2.3%2B)
33
[![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/T1305951)
4-
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
4+
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183/help-resources/devexpress-code-examples)
55
[![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives)
66
<!-- default badges end -->
7-
# DevExpress VCL Reports - Localize the DevExpress Report Viewer and Report Designer
87

9-
This example localizes DevExpress VCL [Report Viewer](https://docs.devexpress.com/XtraReports/401850/web-reporting/web-document-viewer)/[Report Designer](https://docs.devexpress.com/XtraReports/119176/web-reporting/web-end-user-report-designer) dialogs ([TdxReport](https://docs.devexpress.com/VCL/dxReport.TdxReport) component). German UI localization strings are stored within the project's [Localization](https://github.com/DevExpress-Examples/vcl-reports-localize/tree/25.1.4%2B/Localization) folder as JSON files. You can download UI localizations for additional languages from the [DevExpress Localization Service](https://localization.devexpress.com/).
8+
# DevExpress VCL Reports—Localize the Report Viewer and Report Designer
109

11-
<img width="1049" height="697" alt="vcl-reports-tdxreport-report-viewer-localization" src="https://github.com/user-attachments/assets/8e2366ae-501e-4b53-a8d9-865ba7155a2c" />
10+
This example localizes DevExpress VCL Reports components.
11+
12+
The [DevExpress Reporting Platform](https://docs.devexpress.com/VCL/405469/ExpressReports/vcl-reports) has full support for UI localization.
13+
The localization example in this repository gives users a choice between English (default) and German (localized) versions of two built-in dialogs:
14+
[Report Viewer](https://docs.devexpress.com/XtraReports/401850/web-reporting/web-document-viewer) and
15+
[Report Designer](https://docs.devexpress.com/XtraReports/119176/web-reporting/web-end-user-report-designer).
16+
The example includes projects for both [Delphi](./Delphi) and [C++ Builder](./CPB).
17+
18+
![Start screen of the localization example, offering to select between English and German, and to display Report Designer and Report Viewer dialogs](./images/Lokalisierungsbeispiel.png)
19+
20+
## Prerequisites
21+
22+
- Microsoft Windows 10 or newer
23+
- Embarcadero RAD Studio IDE 12.3 (Athens) or newer (Community Edition is not supported)
24+
- The [EdgeView2 SDK](https://getitnow.embarcadero.com/edgeview2-sdk/) package installed from GetIt
25+
- DevExpress VCL Components v25.2.3 or newer
26+
27+
## Implementation Details
28+
29+
To localize the DevExpress Report Designer and Report Viewer in your Delphi or C++ Builder application,
30+
do the following:
31+
32+
1. Use the [DevExpress UI Localization Service](https://docs.devexpress.com/GeneralInformation/16235/localization/localization-service)
33+
to obtain localization files for DevExpress VCL Report Viewer and Designer.
34+
These files contain UI string translations for a specific language/locale.
35+
Refer to the following guide for step-by-step instructions:
36+
[Localize Core Reporting Components: Use JSON Files](https://docs.devexpress.com/XtraReports/400932/web-reporting/common-features/localization/localization-in-asp-net-core-reporting-applications#use-json-files).
37+
1. Extract downloaded files to a `Localization` folder next to your compiled application executable.
38+
Note that projects in this repository output their executables to the same location.
39+
This allows both projects to use the same localization files.
40+
1. Assign a language identifier (also known as [locale][1] or [culture identifier][2]) to the
41+
[`TdxReport.Language`](https://docs.devexpress.com/VCL/dxReport.TdxReport.Language)
42+
property to switch the Report Designer and Report Viewer UI to a specific language:
43+
44+
```delphi
45+
dxReport1: TdxReport;
46+
// Switch Report UI to German
47+
dxReport1.Language := 'de-DE'
48+
```
49+
50+
[1]: https://learn.microsoft.com/en-us/globalization/reference/glossary#locale
51+
[2]: https://learn.microsoft.com/en-us/dotnet/fundamentals/runtime-libraries/system-globalization-cultureinfo#culture-names-and-identifiers
52+
53+
For a more detailed step-by-step guide to localizing your applications, refer to the following help topic:
54+
[Report Viewer and Designer UI Localization](https://docs.devexpress.com/VCL/405598/ExpressReports/localization/vcl-report-viewer-and-designer-localization).
55+
56+
This example does not localize report content.
57+
To localize report content in your project, refer to the following guide: [Report Localization](https://docs.devexpress.com/VCL/405599/ExpressReports/localization/vcl-report-localization).
58+
59+
The localization mechanism demonstrated in this example applies only to DevExpress Report Designer and Report Viewer components.
60+
The DevExpress VCL library components support localization using [resource files and the Localizer Editor](https://docs.devexpress.com/VCL/154039/ExpressCrossPlatformLibrary/how-to/localize-an-application).
61+
62+
## Files to Review
63+
64+
- [`Delphi/uMainForm.pas`](./Delphi/uMainForm.pas) loads an example report from `ExampleReport.repx`.
65+
Event handlers assigned to [`TcxRadioButton`](https://docs.devexpress.com/VCL/cxRadioGroup.TcxRadioButton)
66+
components switch localization language between English and German.
67+
- [`Localization/*.de.json`](./Localization/) files contain localized UI strings.
1268
1369
## Documentation
1470
15-
* [VCL Report Viewer and Designer UI Localization](https://docs.devexpress.com/VCL/405598/ExpressReports/localization/vcl-report-viewer-and-designer-localization)
16-
* [VCL Reports Localization](https://docs.devexpress.com/VCL/405597/ExpressReports/vcl-reports-localization)
17-
* [DevExpress UI Localization Service](https://docs.devexpress.com/GeneralInformation/16235/localization/localization-service)
18-
* [TdxReport.Language Property](https://docs.devexpress.com/VCL/dxReport.TdxReport.Language)
71+
- [VCL Report Viewer and Designer UI Localization](https://docs.devexpress.com/VCL/405598/ExpressReports/localization/vcl-report-viewer-and-designer-localization)
72+
- [VCL Reports Localization](https://docs.devexpress.com/VCL/405597/ExpressReports/vcl-reports-localization)
73+
- [DevExpress UI Localization Service](https://docs.devexpress.com/GeneralInformation/16235/localization/localization-service)
74+
- [TdxReport.Language Property](https://docs.devexpress.com/VCL/dxReport.TdxReport.Language)
75+
- [ExpressReports Application Deployment Requirements](https://docs.devexpress.com/VCL/405469/ExpressReports/vcl-reports#expressreports-app-deployment)
76+
77+
## Localized Report Dialogs Preview
78+
79+
Localized Report Designer:
80+
81+
![VCL Report Designer dialog with interface localized into German](./images/Berichtsdesigner.png)
82+
83+
Localized Report Viewer:
84+
85+
![VCL Report Viewer dialog with interface localized into German](./images/Berichtsanzeige.png)
1986
2087
<!-- feedback -->
2188
## Does this example address your development requirements/objectives?

images/Berichtsanzeige.png

77.1 KB
Loading

images/Berichtsdesigner.png

137 KB
Loading

images/Lokalisierungsbeispiel.png

24.1 KB
Loading

0 commit comments

Comments
 (0)