Skip to main content

Localizing the Query Builder

The Query Builder supports built-in localization mechanisms and allows you to fine-tune the localization programmatically by substituting particular localization strings.

Use Satellite Resource Assemblies

You can localize the Query Builder like other .NET applications using Satellite Resource Assemblies (libraries that contain translated resources).

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

Substitute Localization Strings

You can manually substitute a particular localization string with a custom one by calling the UpdateLocalization(localization) method in the client-side CustomizeLocalization event. This method receives an object containing key-value pairs that define the specified strings’ localization.

@Html.DevExpress().QueryBuilder(settings => {
    settings.Name = "QueryBuilder";
    settings.RouteValues = new { Controller = "QueryBuilder", Action = "Invoke" };
    settings.ClientSideEvents.CustomizeLocalization = "function(s) { " +
        "s.UpdateLocalization({" +
            "'Save': 'Speichern'," +
            "'Preview Results': 'Vorschau' });}";
}).Bind("Northwind").GetHtml()

Note

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

You can use this approach in conjunction with Satellite Resource Assemblies.