Localization

  • 3 minutes to read

You can localize the Web End-User Report Designer UI and use the Report Designer to localize the reports.

Localize Web End-User Report Designer UI

To localize the Web End-User Report Designer you can use the built-in localization mechanisms and subsequently adjust the localization by substituting particular localization strings.

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 ASPxClientWebDocumentViewer.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.


<script type="text/javascript" id="script"> 
    function customizeLocalization(s) {
        s.UpdateLocalization({
            'Search': 'Suche',
            'Search result': 'Suchergebnisse',
            'Next Page' : 'Nächste Seite',
            'Export Options' : 'Exportoptionen'
        });
    }
</script> 

<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server">
    <ClientSideEvents CustomizeLocalization="customizeLocalization"/>
</dx:ASPxWebDocumentViewer>
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. E.g. the 'Search result' string is displayed as 'SEARCH RESULT'.

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:

web-viewer-localization-browser-inspect

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:

  1. 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.

  2. 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.

  3. 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.

NOTE

Review the Localize Reports article for more information.