Skip to main content
A newer version of this page is available. .

Satellite Resource Assemblies

  • 3 minutes to read

Satellite resource assemblies are the standard localization mechanism provided by the .NET Framework to build multi-language applications. Refer to the following topic in the Visual Studio documentation to learn more about localization: Develop globalized and localized apps.

Obtain Satellite Assemblies

DevExpress provides satellite resource assemblies for a variety of languages and cultures.

The DevExpress .NET Products installer registers assemblies for several cultures (German, Spanish, Japanese, and Russian) into the GAC, and also places them in the installation folder (“C:\Program Files (x86)\DevExpress 20.2\Components\Bin\Framework\“, by default). You can find these assemblies in the following subfolders:

Subfolder name Culture
de German
es Spanish
ja Japanese
ru Russian

To obtain satellite assemblies for other cultures, use the DevExpress Localization Service. This service allows you to modify existing translations, and compile and download satellite assemblies.

Add Assemblies to Your Application

In the Bin directory of your application, create a subfolder for every added culture. The subfolder’s name is the language code (for example, “de“). Copy satellite assemblies to the corresponding subfolder.

The following diagram illustrates where satellite assemblies should be placed within your application’s directory.

Localization_ASP

Alternatively, you can install satellite resource assemblies in the GAC. In this case, you do not need to copy them to the application. Assemblies that are installed in the GAC are accessible in the Project Wizard’s Localization Tab.

Note

Assemblies located in the GAC have higher priority over assemblies located in an application. For this reason, if you add satellite resource assemblies to your application, make sure that they are not installed in the GAC. Otherwise, the application’s assemblies have no effect on a developer machine.

To remove satellite resource assemblies from the GAC, use the tool provided in the following Knowledge Base article: How to manage satellite assemblies located in GAC.

Important

You must deploy the satellite resource assemblies to the production server.

Set an Application Culture

An application culture is defined by the Culture and UICulture properties. You can specify them in the following ways.

Localize an Application for a Specific Culture (regardless of operating system settings)

Set the Culture and UICulture properties to a certain culture ID. You can specify the properties at design time or runtime.

Design Time

  • To set the culture for all pages, add the globalization element to the Web.config file. Set the Culture and uiCulture attributes.

    <system.web>
        <globalization uiCulture="es" culture="es" />
        ...
    </system.web>
    
  • To set the culture for an individual page, set the Culture and UICulture attributes of the @ Page directive.

    <%@ Page UICulture="es" Culture="es" %>
    

Runtime

Override the InitializeCulture() method to specify the Culture and UICulture properties for the page.

protected override void InitializeCulture() {
     var lang = Request.QueryString["lang"];
     if (!string.IsNullOrEmpty(lang)) {
          Culture = lang;
          UICulture = lang;
     }
}
<style type="text/css">
     .lang-btn
     {
          text-decoration: none;
     }
</style>
...
<a class="lang-btn" href="Default.aspx?lang=en">
     <img src="Images/english.png" alt="English" />
</a>
<a class="lang-btn" href="Default.aspx?lang=de">
     <img src="Images/german.png" alt="Deutsch" />
</a>
<a class="lang-btn" href="Default.aspx?lang=es">
     <img src="Images/spanish.png" alt="Spanish" />
</a>

<dx:ASPxGridView ID="ASPxGridView1" ...
</dx:ASPxGridView>

The animation below shows the result.

Localization_InitializeCulture

Localize an Application for Numerous Cultures (based on operating system settings)

  • Provide multiple localization sources within your application for each culture to support.
  • Set the Culture and UICulture properties to auto.

The application automatically determines the operating system’s culture information and loads the appropriate assemblies for this culture. You can set the Culture and UICulture properties in any of the ways described above.

<%@ Page UICulture="auto" Culture="auto" %>