This is a discussion on What is meant by Satellite assembly in Asp.Net ? within the ASP and ASP.NET Programming forums, part of the Web Development category; What is meant by Satellite assembly in Asp.Net ?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Assembly containing no executable code, it have only resources. Typically, satellite assemblies are used for storing localized data. Satellite assembles can be added, modified, and loaded into a .NET application at runtime without recompiling. Use the Assembly Linking Utility to create satellite assemblies by compiling .resource files |
| |||
| 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. This is called the hub and spoke model. It requires that you place resources in specific locations so that they can be located and used easily. If you do not compile and name resources as expected, or if you do not place them in the correct locations, the common language runtime will not be able to locate them. As a result, the runtime uses the default resource set. Creating a Satellite Assembly 1. Create a folder with a specific culture name (for example, en-US) in the application's bin\debug folder. 2. Create a .resx file in that folder. Place all translated strings into it. 3. Create a .resources file by using the following command from the .NET command prompt. (localizationsample is the name of the application namespace. If your application uses a nested namespace structure like MyApp.YourApp.MyName.YourName as the type of namespace, just use the uppermost namespace for creating resources files—MyApp.) resgen Strings.en-US.resx LocalizationSample. Strings.en-US.resources al /embed:LocalizationSample.Strings.en-US.resources /out:LocalizationSample.resources.dll /c:en-US The above step will create two files, LocalizationSample.Strings.en-US.resources and LocalizationSample.resources.dll. Here, LocalizationSample is the name space of the application. 4. In the code, find the user's language; for example, en-US. This is culture specific. 5. Give the assembly name as the name of .resx file. In this case, it is Strings. Using a Satellite Assembly Follow these steps: Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(specCult); Thread.CurrentThread.CurrentUICulture = new CultureInfo(specCult); ResourceManager resMgr = new ResourceManager(typeof(Form1).Namespace + "." + asmName, this.GetType().Assembly); btnTest.Text = resMgr.GetString("Jayant"); That’s it…
__________________ S.VinothkumaR Behind me is infinite power, Before me is Endless Possibility, Around me is Boundless Opportunity, Why should I fear! |
| |||
| Hi, Here i am giving smart Definition for satellite Assembly.. I hope that these words r useful to u all... Assembly containing no executable code—only resources. Typically, satellite assemblies are used for storing localized data. Satellite assembles can be added, modified, and loaded into a .NET application at runtime without recompiling. Use the Assembly Linking Utility to create satellite assemblies by compiling .resource files.
__________________ Krishnakumar.S Beware of Everything -that is un true; stick to the Truth shall succeed slowly but steadily |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is meant by Levenshtein distance in PHP? | $enthil | PHP Programming | 1 | 12-10-2007 10:51 PM |
| What is meant by urlencode and urldecode? | Sabari | PHP Programming | 6 | 09-12-2007 01:23 AM |
| What is meant by urlencode and urldecode? | senraj | PHP Programming | 2 | 07-20-2007 04:46 AM |
| Whats an assembly? | prasath | ASP and ASP.NET Programming | 1 | 07-19-2007 02:20 AM |
| What is meant by Bandwidth stealing..? how can we avoid it..? | bluesky | Server Management | 1 | 07-19-2007 12:36 AM |