Skip to content

Commit 0bd89c1

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 0bd89c1

4 files changed

Lines changed: 82 additions & 8 deletions

File tree

README.md

Lines changed: 82 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,95 @@
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+
See the [DevExpress Reports Prerequisites](https://docs.devexpress.com/VCL/405469/ExpressReports/vcl-reports#expressreports-prerequisites).
23+
24+
## Implementation Details
25+
26+
To localize the DevExpress Report Designer and Report Viewer in your Delphi or C++ Builder application,
27+
do the following:
28+
29+
1. Use the [DevExpress UI Localization Service](https://docs.devexpress.com/GeneralInformation/16235/localization/localization-service)
30+
to obtain localization files for DevExpress VCL Report Viewer and Designer.
31+
These files contain UI string translations for a specific language/locale.
32+
Refer to the following guide for step-by-step instructions:
33+
[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).
34+
1. Extract downloaded files to a `Localization` folder next to your compiled application executable.
35+
Note that projects in this repository output their executables to the same location.
36+
This allows both projects to use the same localization files.
37+
1. Assign a language identifier (also known as [locale][1] or [culture identifier][2]) to the
38+
[`TdxReport.Language`](https://docs.devexpress.com/VCL/dxReport.TdxReport.Language)
39+
property to switch the Report Designer and Report Viewer UI to a specific language:
40+
41+
**Delphi:**
42+
```delphi
43+
dxReport1: TdxReport;
44+
45+
// Switch Report UI to German
46+
dxReport1.Language := 'de-DE'
47+
```
48+
49+
**C++Builder:**
50+
```cpp
51+
TdxReport *dxReport1;
52+
53+
// Switch Report UI to German
54+
dxReport1->Language = "de-DE";
55+
```
56+
57+
[1]: https://learn.microsoft.com/en-us/globalization/reference/glossary#locale
58+
[2]: https://learn.microsoft.com/en-us/dotnet/fundamentals/runtime-libraries/system-globalization-cultureinfo#culture-names-and-identifiers
59+
60+
For a more detailed step-by-step guide to localizing your applications, refer to the following help topic:
61+
[Report Viewer and Designer UI Localization](https://docs.devexpress.com/VCL/405598/ExpressReports/localization/vcl-report-viewer-and-designer-localization).
62+
63+
This example does not localize report content.
64+
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).
65+
66+
The localization mechanism demonstrated in this example applies only to DevExpress Report Designer and Report Viewer components.
67+
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).
68+
69+
## Files to Review
70+
71+
- [`Delphi/uMainForm.pas`](./Delphi/uMainForm.pas) loads an example report from `ExampleReport.repx`.
72+
Event handlers assigned to [`TcxRadioButton`](https://docs.devexpress.com/VCL/cxRadioGroup.TcxRadioButton)
73+
components switch localization language between English and German.
74+
- [`Localization/*.de.json`](./Localization/) files contain localized UI strings.
1275
1376
## Documentation
1477
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)
78+
- [VCL Report Viewer and Designer UI Localization](https://docs.devexpress.com/VCL/405598/ExpressReports/localization/vcl-report-viewer-and-designer-localization)
79+
- [VCL Reports Localization](https://docs.devexpress.com/VCL/405597/ExpressReports/vcl-reports-localization)
80+
- [DevExpress UI Localization Service](https://docs.devexpress.com/GeneralInformation/16235/localization/localization-service)
81+
- [TdxReport.Language Property](https://docs.devexpress.com/VCL/dxReport.TdxReport.Language)
82+
- [ExpressReports Application Deployment Requirements](https://docs.devexpress.com/VCL/405469/ExpressReports/vcl-reports#expressreports-app-deployment)
83+
84+
## Localized Report Dialogs Preview
85+
86+
Localized Report Designer:
87+
88+
![VCL Report Designer dialog with interface localized into German](./images/Berichtsdesigner.png)
89+
90+
Localized Report Viewer:
91+
92+
![VCL Report Viewer dialog with interface localized into German](./images/Berichtsanzeige.png)
1993
2094
<!-- feedback -->
2195
## 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)