Assembly (CLI) - Satellite Assemblies

Satellite Assemblies

In general, assemblies should contain culture-neutral resources. If you want to localize your assembly (for example use different strings for different locales) you should use satellite assemblies — special, resource-only assemblies. As the name suggests, a satellite is associated with an assembly called the main assembly. That assembly (say, lib.dll) will contain the neutral resources (that Microsoft says is International English, but implies to be US English). Each satellite has the name of the associated library appended with .resources (for example lib.resources.dll). The satellite is given a non-neutral culture name, but since this is ignored by existing Windows file systems (FAT32 and NTFS) this would mean that there could be several files with the same PE name in one folder. Since this is not possible, satellites must be stored in subfolders under the application folder. For example, a satellite with the UK English resources will have a CLI name of "lib.resources Version=0.0.0.0 Culture=en-GB PublicKeyToken=null", a PE file name of lib.resources.dll, and will be stored in a subfolder called en-GB.

Satellites are loaded by a CLI class called System.Resources.ResourceManager. The developer has to provide the name of the resource and information about the main assembly (with the neutral resources). The ResourceManager class will read the locale of the machine and use this information and the name of the main assembly to get the name of the satellite and the name of the subfolder that contains it. ResourceManager can then load the satellite and obtain the localized resource.

Read more about this topic:  Assembly (CLI)

Famous quotes containing the words satellite and/or assemblies:

    Books are the best things, well used; abused, among the worst. What is the right use? What is the one end, which all means go to effect? They are for nothing but to inspire. I had better never see a book, than to be warped by its attraction clean out of my own orbit, and made a satellite instead of a system.
    Ralph Waldo Emerson (1803–1882)

    Whenever you pray, make sure you do it at school assemblies and football games, like the demonstrative creatures who pray before large television audiences. That is the real goal of the thing. But do not, I urge you, pray all alone in your home where no one can see. That does not get you ratings.
    Garry Wills (b. 1934)