Click here to Skip to main content
13,093,720 members (55,160 online)
Click here to Skip to main content
Add your own
alternative version


44 bookmarked
Posted 22 Mar 2012

Satellite Assembly Example in C# (Step by Step)

, 22 Apr 2012
Rate this:
Please Sign up or sign in to vote.
Implement a satellite assembly in C#.


This article is about how to understand and implement a satellite assembly.


A satellite assembly is a .NET Framework assembly containing resources specific to a given language. Using satellite assemblies, you can place resources for different languages in different assemblies, and the correct assembly is loaded into memory only if the user selects to view the application in that language.


Using the code

Here is the step by step procedure to create an application with a satellite assembly:

1.Create a new Windows project (say: TestApp).

2.Add a ComboBox (name it cmbLanguage) and two Labels (one label for “Select Language” and the other for Displaying the Result (name it lblMultiLangResult)) as shown below:


1. Add three Resx files (string.en-US.resx, string.he.resx, and for English, Hindi, and Arabic, respectively). Note: For other language codes, visit:

2. In the resx files, enter the values shown below:

Enter Values

5. Next, open the code file (.cs file) and create the object for the resource manager at class level:

System.Resources.ResourceManager rm = new System.Resources.ResourceManager("TestApp.string", Assembly.GetExecutingAssembly());
Here in the first parameter: TestApp is the name of your Windows Application and string is the name of the Resource file part before the language code. Second parameter is the Main Assembly for the resources (for this you have to add the namespace: using System.Reflection;).

6. Write the following function for the culture:

private void ChangeCulture(string sLangCode)
    Thread.CurrentThread.CurrentUICulture = new CultureInfo(sLangCode);
    Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(sLangCode);
    lblMultiLangResult.Text = rm.GetString("lblResult");
For the above function to run, please add the following namespaces:
using System.Threading; //For Threading
using System.Globalization; //For CultureInfo

7. On the ComboBox item change event, add the following code:

private void cmbLanguage_SelectedIndexChanged(object sender, EventArgs e)
        string sLangCode;
        if (cmbLanguage.SelectedIndex == 0)
            sLangCode = "en-US";
        else if (cmbLanguage.SelectedIndex == 1)
            sLangCode = "he";
        else if (cmbLanguage.SelectedIndex == 2)
            sLangCode = "ar-sa";

8. On page load, add the following line of code:


9. Run the application and see the output as below:


Points of Interest

When you look at ApplicationFolder/bin/release (check bin/debug if you are running in debug mode), there are three folders containing the same name of the DLL but each for different culture. The correct one will load when the user selects one of them.

Satellite Assembly


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


About the Author

Software Developer (Senior)
India India
Linkedin profile:

You may also be interested in...

Comments and Discussions

GeneralThanks a lot for posting this example Pin
chensike8911-Nov-15 10:09
memberchensike8911-Nov-15 10:09 
GeneralRe: Thanks a lot for posting this example Pin
Vipin_Arora21-Nov-15 1:25
memberVipin_Arora21-Nov-15 1:25 
GeneralMy vote of 5 Pin
Ehsan Sajjad20-Oct-15 0:14
professionalEhsan Sajjad20-Oct-15 0:14 
QuestionCorrect Arabic word Pin
Mohammed Qutaty15-Feb-15 7:42
memberMohammed Qutaty15-Feb-15 7:42 
AnswerRe: Correct Arabic word Pin
Vipin_Arora15-Feb-15 16:16
memberVipin_Arora15-Feb-15 16:16 
GeneralMy vote of 5 Pin
Thomas ktg18-Mar-14 1:40
memberThomas ktg18-Mar-14 1:40 
QuestionConcise and easy. Pin
Septimus Hedgehog12-Feb-14 5:32
memberSeptimus Hedgehog12-Feb-14 5:32 
GeneralNice article Pin
Birendra Singh19-Nov-13 23:27
memberBirendra Singh19-Nov-13 23:27 
GeneralRe: Nice article Pin
Vipin_Arora20-Nov-13 16:17
memberVipin_Arora20-Nov-13 16:17 
QuestionVery Useful Pin
Vedangi2-Oct-13 22:39
memberVedangi2-Oct-13 22:39 
AnswerRe: Very Useful Pin
Vipin_Arora4-Oct-13 23:13
memberVipin_Arora4-Oct-13 23:13 
GeneralMy vote of 4 Pin
Er. Vikas Sangal12-Mar-13 20:27
memberEr. Vikas Sangal12-Mar-13 20:27 
GeneralMy vote of 5 Pin
madver14-Feb-13 14:27
membermadver14-Feb-13 14:27 
GeneralMy vote of 2 Pin
vinay8724-Aug-12 19:32
membervinay8724-Aug-12 19:32 

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
Web02 | 2.8.170813.1 | Last Updated 22 Apr 2012
Article Copyright 2012 by Vipin_Arora
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid