Localize Standard DevExpress Modules and UI Controls
- 4 minutes to read
The DevExpress Localization Tool provides ready-to-use translations of standard XAF modules and DevExpress controls in different languages and formats, including satellite assemblies and RESX files. This topic describes how to apply these translations to your application and how to localize standard XAF modules and DevExpress controls when ready-to-use translations are not available for your language.
How to Apply Satellite Assemblies
Tip
The Product Installer includes assemblies for German (de), Spanish (es), and Japanese (ja) languages. Select the Community Source Localization (for de, es, ja) item in the Select Products installer page to install the assemblies in %PROGRAMFILES%\DevExpress 26.1\Components\Bin folder.
You can download localization satellite assemblies from DevExpress Localization Tool GitHub repository. Refer to the following topic for additional information: Localization Tool — Export to Satellite Assemblies.
Add the new language aspect as described in the Localize an XAF Application topic, and restart Visual Studio to display localized values in the Model Editor.
Ensure that the Languages key from the configuration file’s appSettings section contains all the languages your application supports:
<configuration>
<appSettings>
<!-- ... -->
<add key="Languages" value="en;de;fr" />
<!-- ... -->
</appSettings>
<!-- ... -->
<configuration>
{
//
"DevExpress": {
"ExpressApp": {
"Languages": "en;de;fr"
// ...
}
}
}
Note
You should deploy satellite assemblies with an XAF application. Refer to the corresponding Deployment Tutorial‘s topic for more information.
How to Apply RESX Localization Files
Create RESX and add them to your application as described in the following help topic: Export to Merged/Single RESX.
Important
Note that during the export you need to select only
BaseImpl.EFCoreorBaseImpl.Xpo. We do not support XPO and EFCore in one file.Subscribe to the CreateCustomModelDifferenceStore event in the project’s Module class.
public sealed class SolutionNameBlazorModule : ModuleBase { public override void Setup(XafApplication application) { // ... application.CreateCustomModelDifferenceStore += Application_CreateCustomModelDifferenceStore; } }In the event handler, call the AddExtraDiffStore(String, ModelStoreBase) method to add an extra model differences storage of
ResxModelStoretype.private void Application_CreateCustomModelDifferenceStore(object sender, CreateCustomModelDifferenceStoreEventArgs e) { e.AddExtraDiffStore("ResxStore", new ResxModelStore(this.GetType().Assembly, "DevExpress_Localization", (XafApplication)sender)); }Run the application.
Note
Strings from RESX ans JSON files have higher priority and override satellite assembly localizations.
Manual Localization
If the technique described in the section above does not apply to you, follow the instructions from the following topic: Localize an XAF Application Directly in the Model Editor.
Culture-specific resources should be exported to the Application Model when you localize DevExpress Controls.
Use the XafApplication.ResourcesExportedToModel to access the collection of Resource Localizers.
File: SolutionName.Win\Program.cs
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Utils;
using DevExpress.ExpressApp.Win;
using DevExpress.Persistent.Base;
using DevExpress.XtraEditors;
namespace SolutionName.Win;
public class Program {
public static void Main(string[] arguments) {
SolutionNameWinApplication winApplication = new SolutionNameWinApplication();
//...
winApplication.ResourcesExportedToModel.Add(typeof(
DevExpress.ExpressApp.Win.Localization.GridControlLocalizer));
winApplication.Setup();
//...
}
}
Invoke the Model Editor for the current application project. In the Localization node, you will find child nodes corresponding to the selected resources. Localize them, as with any other XAF string.

Note
Certain components added to a Model require a reference. For example, after adding the XtraGrid Control to the Model, you get the following error: “The type ‘DevExpress.XtraGrid.Localization.GridResLocalizer’ is defined in an assembly that is not referenced. You should add a reference to assembly ‘DevExpress.XtraGrid.v26.1…”. Add a reference to the required assembly to resolve this issue.
Reuse Your Translations
You can use one of the following approaches to reuse translations in different XAF applications:
- Localize all standard XAF module captions using the Model Editor invoked for the application project and share the resulting XAFML files with translations;
- Create a new XAF module and localize all standard XAF module captions using the Model Editor invoked for its Model.DesignedDiffs.xafml file as described in the following help topic: Localize an XAF Application Directly in the Model Editor.