Back to Devexpress

Localize UI Elements

expressappframework-403184-getting-started-in-depth-tutorial-blazor-customize-data-display-and-view-layout-localize-ui-elements.md

latest3.0 KB
Original Source

Localize UI Elements

  • Feb 21, 2026
  • 3 minutes to read

This lesson explains how to localize an XAF application. It describes how to translate UI elements into German and create a multi-language application.

Note

For more information on localization, review the following topics:

Step-by-Step Instructions

  1. Add the following packages to the MySolution.Blazor.Server and MySolution.Win projects:

  2. In the MySolution.Blazor.Server project, open the appsettings.json file. Add the German language to the DevExpress:ExpressApp:Languages section and enable the runtime language switcher. You should always use the fully qualified language name that includes the country code (for example, de-DE instead of de):

  3. Open the Model.DesignedDiffs.xafml file in the Model Editor. Focus the MySolution node and click Languages Manager… in the Language combo box on the Model Editor Toolbar.

  4. Add the target language in the invoked dialog and click OK.

  5. In the Solution Explorer, right-click the Model.DesignedDiffs.Localization.de-DE.xafml file and open its Properties window. Make sure that the Build Action field is set to Embedded resource.

  6. Open the Model.DesignedDiffs.xafml file in the Model Editor. Select the newly added language in the Language combo box.

  7. The localization packages translate standard strings/messages used in XAF. You also need to translate the strings that are unique to your current application (such as object or property names). To do that, locate properties denoted by the “globe” glyph in all the nodes and child nodes and assign a German translation to them. For the purposes of this tutorial, translate the Employees navigation item to Angestellte:

  8. In the MySolution.Win project, open the Model.xafml file in the Model Editor and navigate to the MySolution node. Set the PreferredLanguage property to de-De to display the localized strings in the UI when you run the Windows Forms application.

  9. Run the application.

  10. The application should display the German translation of the Employees navigation item.

Next Lesson

Assign a Standard Image