Localizing ASP.NET Controls via Satellite Resource Assemblies
- 3 minutes to read
This document demonstrates the most common approach to localizing a .NET application using Satellite Resource Assemblies (libraries that contain translated resources). These assemblies are the standard localization mechanism provided by the .NET Framework, to build multi-language applications. Refer to the Localizing Applications topic in MSDN to learn more about localization.
You can also localize your applications using custom localizers, but some controls contain form resources (e.g., the XtraReports Search dialog), and the only way to translate them is to create satellite assemblies. Thus, localization via resources is the preferable solution.
This document consists of the following sections.
Obtaining Satellite Assemblies
In most cases, it is not necessary to manually translate all language-specific resources, because DevExpress provides satellite assemblies for a variety of languages and cultures.
The .NET Products Installer includes resource assemblies for a set of languages. It registers these assemblies into the GAC (Global Assembly Cache) of your development machine, and also places them in the installation folder ("C:\Program Files (x86)\DevExpress 18.2\Components\Bin\Framework\", by default). You can find these assemblies within the following subfolders:
|Subfolder name||Corresponding culture|
See the Language Identifier Constants and Strings topic in MSDN to learn about culture identifiers.
To obtain satellite assemblies for DevExpress .NET controls that correspond to other cultures, use the DevExpress Localization Service. This service allows you to modify the existing translations, compile and download the satellite assemblies.
Note that if you place custom assemblies in the project's bin folder, modified translations have no effect on a developer machine. It occurs because the default DevExpress assemblies located in the GAC have higher priority. This applies translations from these assemblies. To overcome the problem, remove default localization assemblies from the GAC. You can use the tool from the How to manage satellite assemblies located in GAC article for this purpose. This applies translations from the custom localization assemblies placed in the bin folder when default assemblies are removed from the GAC.
You can find the Resource String enumerations for DevExpress ASP.NET controls in the Localizing ASP.NET Controls via Localizer Objects topic and use them to search for the required localizable string within the translation table.
Adding Satellite Assemblies to Your Application
To add localized resources to your application, copy satellite assemblies from the unpacked archive to the corresponding subfolders of your application's directory. The subfolder's name is the culture's abbreviation. For example, to include German assemblies, copy the folder named de from the \Bin\Framework\ directory to the Bin directory of your application.
The following diagram illustrates where satellite assemblies should be placed within your application's directory.
Alternatively, you can install satellite resource assemblies into the GAC. In this case, you can use these localizations in applications without copying satellite assemblies. In any case, deploying the assemblies to the production server is required.
Assemblies that are installed in the GAC are accessible in the Wizard Localization Tab.
When the required satellite resource assemblies are placed in the appropriate locations, the localization can be specified via the Culture and UICulture properties. To learn more, see the How to: Set a Culture for an ASP.NET Web Page topic.