Click here to Skip to main content
13,352,298 members (73,660 online)
Click here to Skip to main content
Add your own
alternative version


24 bookmarked
Posted 27 Sep 2007

Satellite Assembly and Implementation Details

, 27 Sep 2007
Rate this:
Please Sign up or sign in to vote.
Through this article, we will explain the use and implementation details of satellite assembly.


Microsoft released the .NET Framework and common language runtime model, targeting high productivity in software development. Their goal was to create an enriched user experience with easy-to-use products. Satellite assembly comes into the picture when we develop an application that is localized to a specific culture. Throughout this article, we will explain the use and implementation details of satellite assembly.

However, in order to talk about localization, we must know about resource files. Resource files are nothing but a key and textual value collections specific to each language. Therefore we will have to create a resource file for each language that we plan to support. The .NET Framework classes will retrieve language-specific details from these multiple language resource files based on the chosen language context.

Resource File and Satellite Assembly

As we discussed earlier, resource files are essentially a collection of associations between key and textual values specific to a particular language. Resource files can be text, XML or binary resource files. Presumably, the resource file can be generated by language translators in either of the discussed file types. This can later converted using resgen.exe, which can convert a resource file from one format to another. Later, this file gets compiled and will become part of your application. This is called satellite assembly.

To create a resource file, you can highlight a project or a folder and add a new item of the type "assembly resource." This will create a resource file with the extension *.resx. It is also clear that you can have multiple resource files in your project. Once we fill the *.resx file with language-specific details, we then need to use resgen.exe to create a resource file. The below statement will help to achieve this same idea.

resgen fr-FR.resx
Screenshot - image001.jpg
  • resgen: this is the executable to create a resource file from text, XML or binary resource.
  • fr-FR.resx: this contains such language-specific information as Key/Value collection.
  • the output file name of generated resource file.

The next step is to create a satellite assembly from the resource generated by the last command line execution. To create a satellite assembly, we can use an assembly linker, al.exe (see MSDN article), which is shipped along with the Visual Studio software kit.

al /t:lib /
/culture:fr /
Screenshot - image002.jpg
  • t:lib: this specifies the file format of the output file.
  • /embed: this embeds the resource specified by the file in the image that contains the assembly manifest; Al.exe copies the contents of the file into the portable executable (PE) image.
  • /culture: this specifies the culture string to associate with the assembly.
  • /out: this is the name of the satellite assembly.

Repeat the above two command line expressions to create the satellite assembly for all required language support. So, at this stage we are done with the core part of localization. The next phase would be binding the language-specific details to the control object (in this example).

Resource Manager

The ResourceManager class looks up culture-specific resources, provides resource fallback when a localized resource does not exist, and supports resource serialization.

The enclosed example will be using the GetString method of ResourceManager, which can read the textual information from the resources for a particular culture. By default, this method returns the resource for the culture determined by the current cultural settings of the thread that made the call.

In the source code, we have a Windows Form object with combo box control. This combo box will populate all the available cultures.

Screenshot - image003.jpg
ResourceManager rm = null;
CultureInfo ci = Thread.CurrentThread.CurrentCulture;
if (comboBox1.Text == "German - Germany")
    rm = new ResourceManager("", 
    lblOne.Text = rm.GetString("StrMsgOne");
    lblTwo.Text = rm.GetString("StrMsgTwo");
Screenshot - image004.jpg
else if (comboBox1.Text == "French - France")
    rm = new ResourceManager("", 
    lblOne.Text = rm.GetString("StrMsgOne");
    lblTwo.Text = rm.GetString("StrMsgTwo");
Screenshot - image005.jpg

Note: The code block enclosed here is just to demonstrate the GetString method of the ResourceManager class. You can download the source code and then fine-tune the logic or you can use the example.


  • 27 September, 2007 -- Original version posted
  • 28 September, 2007 -- Article content updated


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

sreejith ss nair
Software Developer (Senior) Freelance
India India
He is a certified professional in both MCPD and MCTS. He is a mathematics graduate with masters in computer science.He was born and bred in India and happen to spend some time in Europe.

You may also be interested in...

Comments and Discussions

GeneralMy vote of 3 Pin
Theingi Win6-Nov-12 20:56
groupTheingi Win6-Nov-12 20:56 
GeneralMy vote of 1 Pin
lcorneliussen28-Apr-10 2:07
memberlcorneliussen28-Apr-10 2:07 
GeneralMy vote of 1 Pin
anant.sinha10-Feb-10 12:01
memberanant.sinha10-Feb-10 12:01 
poorly written
GeneralDoubled article Pin
Przemyslaw Celej29-Sep-07 13:12
memberPrzemyslaw Celej29-Sep-07 13:12 
GeneralRe: Doubled article Pin
sreejith ss nair30-Sep-07 21:21
membersreejith ss nair30-Sep-07 21:21 
GeneralBefore now Earth was flat Pin
gnk27-Sep-07 16:56
membergnk27-Sep-07 16:56 
GeneralRe: Before now Earth was flat Pin
sreejith ss nair30-Sep-07 21:20
membersreejith ss nair30-Sep-07 21:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180111.1 | Last Updated 27 Sep 2007
Article Copyright 2007 by sreejith ss nair
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid