All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Localization in Reporting for Vue

  • 2 minutes to read

In the Vue application you should load the localized JSON resources and use the CustomizeLocalization callback to call the LoadMessages method that loads localized strings. You can also use the UpdateLocalization method to substitute particular strings.

Obtain JSON Files from the Localization Service

  1. Log into the DevExpress website.

  2. Open the DevExpress Localization Service.

  3. Select your target language, modify translations, and click the Download button. Refer to the Localization Service documentation topic for more information.

  4. Unpack the downloaded executable file to get the satellite assemblies and json resources directory. This directory contains the following JSON files required to localize the reporting controls (where xx is a culture name):

File Name

Localization Strings

dx-analytics-core.xx.json

Shared Components: Query Builder, Data Source Wizard, Filter Editor, Expression Editor

dx-reporting.xx.json

Web Document Viewer, End-User Report Designer and other reporting-specific components

TIP

The component's UI is built on DevExtreme widgets, so to localize the editors you should also use one of the approaches described in the following topic: DevExtreme - Localization. Specify web server's thread culture to apply culture-specific formats to numbers and dates.

Localize the Application

  1. Copy the dx-analytics-core.xx.json and dx-reporting.xx.json files (where xx is the culture identifier) to the root application folder.

  2. Open the component file and add the code that handles the CustomizeLocalization callback. The following code uses JQuery to load JSON files with translations and substitutes localizable strings with their German equivalents:

    <script>
    // ...
    import $ from "jquery";
    
    export default {
        //...
        mounted() {
            // ...
            var callbacks = {  
                CustomizeLocalization: function (s,e) {
                    e.LoadMessages($.get("./dx-analytics-core.de.json"));
                    e.LoadMessages($.get("./dx-reporting.de.json"));
                    s.UpdateLocalization({
                        'Search': 'Suche',
                        'Search result': 'Suchergebnisse',
                        'Next Page': 'Nächste Seite',
                        'Export Options': 'Exportoptionen',
                        'The document does not contain any pages.': 'Keine Daten'
                    });             
                }
            };  
            ko.applyBindings({
                // ...
                callbacks: callbacks
            }, this.$refs.viewer);
        }
    };
    </script>
    
  3. Recompile the project and open the application in the browser (default URL is http://localhost:8080/).