views:

426

answers:

2

What is a satellite assembly, and when should they be used?

+2  A: 

Satellites are explained on this page,

http://www.grimes.demon.co.uk/workshops/fusWSNine.htm

but you should really do the entire tutorial at:

http://www.grimes.demon.co.uk/workshops/fusionWS.htm

They are not really 'assemblies' in several respects: they do not contain code and they are not loaded by Fusion, .NET's assembly loading technology. Satellites contain localised resources and are loaded with the ResourceManager class. An object of this class will determine the culture that is required and will locate and load the satellite that has resources for that culture. ResourceManager will even load the resource from the satellite. If a suitable satellite is not available, ResourceManager will determine the next best satellite.

Braveyard
+2  A: 

A definition from MSDN says something like this: "A .NET Framework assembly containing resources specific to a given language. Using satellite assemblies, you can place the resources for different languages in different assemblies, and the correct assembly is loaded into memory only if the user elects to view the application in that language."

This means that you develop your application in a default language and add flexibility to react with change in the locale. Say, for example, you developed your application in an en-US locale. Now, your application has multilingual support. When you deploy your code in, say, India, you want to show labels, messages shown in the national language which is other than English.

Satellite assemblies give this flexibility. You create any simple text file with translated strings, create resources, and put them into the bin\debug folder. That's it. The next time, your code will read the CurrentCulture property of the current thread and accordingly load the appropriate resource.

MOZILLA