Skip to content

Commit 02bb772

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 167181c commit 02bb772

4 files changed

Lines changed: 84 additions & 7 deletions

File tree

README.md

Lines changed: 84 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,95 @@
44
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
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 DevExpress 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) fully supports UI localization.
13+
The localization example in this repository allows users to select between English (default) and German (localized) versions of two built-in DevExpress 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+
<img width="450" src="./images/Lokalisierungsbeispiel.png"
19+
alt="Start screen of the localization example, allowing users to select between English and German,
20+
and to display Report Designer and Report Viewer dialogs" />
21+
22+
## Prerequisites
23+
24+
See the [DevExpress Reports Prerequisites](
25+
https://docs.devexpress.com/VCL/405773/ExpressCrossPlatformLibrary/vcl-backend/reports-dashboards-app-deployment#vcl-reportsdashboards-prerequisites).
26+
27+
## Implementation Details
28+
29+
To localize the DevExpress Report Designer and Report Viewer in your Delphi or C++Builder application,
30+
you must:
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 specific languages/locales.
35+
Refer to the following guide to learn more:
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/Report Viewer to the desired language:
43+
44+
**Delphi:**
45+
```delphi
46+
dxReport1: TdxReport;
47+
48+
// Switch Report UI to German
49+
dxReport1.Language := 'de-DE'
50+
```
51+
52+
**C++Builder:**
53+
```cpp
54+
TdxReport *dxReport1;
55+
56+
// Switch Report UI to German
57+
dxReport1->Language = "de-DE";
58+
```
59+
60+
[1]: https://learn.microsoft.com/en-us/globalization/reference/glossary#locale
61+
[2]: https://learn.microsoft.com/en-us/dotnet/fundamentals/runtime-libraries/system-globalization-cultureinfo#culture-names-and-identifiers
62+
63+
For a step-by-step guide, refer to the following help topic:
64+
[Report Viewer and Designer UI Localization](https://docs.devexpress.com/VCL/405598/ExpressReports/localization/vcl-report-viewer-and-designer-localization).
65+
66+
This example does not localize report content.
67+
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).
68+
69+
The localization mechanism described in this example applies only to the DevExpress Report Designer and Report Viewer.
70+
Other DevExpress VCL components support localization using [resource files and the Localizer Editor](https://docs.devexpress.com/VCL/154039/ExpressCrossPlatformLibrary/how-to/localize-an-application).
71+
72+
## Files to Review
73+
74+
- [`Delphi/uMainForm.pas`](./Delphi/uMainForm.pas) loads an example report from `ExampleReport.repx`.
75+
Event handlers assigned to [`TcxRadioButton`](https://docs.devexpress.com/VCL/cxRadioGroup.TcxRadioButton)
76+
components switch localization language between English and German.
77+
- [`Localization/*.de.json`](./Localization/) files contain localized UI strings.
1278
1379
## Documentation
1480
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)
81+
- [VCL Report Viewer and Designer UI Localization](https://docs.devexpress.com/VCL/405598/ExpressReports/localization/vcl-report-viewer-and-designer-localization)
82+
- [VCL Reports Localization](https://docs.devexpress.com/VCL/405597/ExpressReports/vcl-reports-localization)
83+
- [DevExpress UI Localization Service](https://docs.devexpress.com/GeneralInformation/16235/localization/localization-service)
84+
- [TdxReport.Language Property](https://docs.devexpress.com/VCL/dxReport.TdxReport.Language)
85+
- [ExpressReports Application Deployment Requirements](https://docs.devexpress.com/VCL/405469/ExpressReports/vcl-reports#expressreports-app-deployment)
86+
87+
## Localized Report Dialogs Preview
88+
89+
**Localized Report Designer:**
90+
91+
![VCL Report Designer dialog with interface localized into German](./images/Berichtsdesigner.png)
92+
93+
**Localized Report Viewer:**
94+
95+
![VCL Report Viewer dialog with interface localized into German](./images/Berichtsanzeige.png)
1996
2097
<!-- feedback -->
2198
## 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)