The requested page is not available for the requested platform. You are viewing the content for Default platform.


  • 2 min to read

This document provides information on how to localize the Web Document Viewer using the built-in localization mechanisms and programmatically fine-tune the localization by substituting particular localization strings.

You can use one of the following approaches or both approaches simultaneously:

Use Satellite Resource Assemblies

You can localize the Web Document Viewer using Satellite Resource Assemblies (libraries that contain translated resources), which is a common approach to localizing .NET applications.

Refer to Localizing ASP.NET Controls via Satellite Resource Assemblies for more information.

Substitute Localization Strings

Call the UpdateLocalization method in the client-side CustomizeLocalization event to manually substitute a particular localization string with a custom one. This method receives an object containing key-value pairs that define localization for the specified strings.

Note that you can use this approach in conjunction with Satellite Resource Assemblies.

@Html.DevExpress().WebDocumentViewer(settings => {
    settings.Name = "WebDocumentViewer";
    settings.ClientSideEvents.CustomizeLocalization = "function(s) { " +
    "s.UpdateLocalization({" +
        "'Search' : 'Suche'," +
        "'Search result' : 'Suchergebnisse'," +
        "'Next Page': 'Nächste Seite'," + // A tooltip text.
        "'Export Options' : 'Exportoptionen'});}";
}).Bind(new DXWebApplication.XtraReport1()).GetHtml()

Localization strings are case sensitive. A string is only translated if you specified it in the correct case.

On a web page, specific strings look different from their actual values. For instance, the 'Search result' string is actually displayed as 'SEARCH RESULT'.

You can know the actual string value by finding the corresponding UI element in the page markup (for example, using your browser's Developer Tools).