Tuesday, March 22, 2005

[itsdifferent] Satellite Assemblies

---------- Forwarded message ----------
From: Deven Goratela
Date: Wed, 16 Mar 2005 18:35:15 +0530
Subject: [itsdifferent] Satellite Assemblies
To: itsdifferent@yahoogroups.com

Satellite assemblies allow storing the translated strings for each
culture in a separate, resource-only assembly file that can load
automatically based on the setting of the CurrentUICulture property.
Using satellite assemblies provides the same advantages as adjusting
to the culture at run time, plus satellite assemblies simplify
displaying content from multiple translated sources.

Satellite assemblies are assembly files (.dll) that contain localized
resources for an application. Each satellite assembly file contains
the resources for one culture. An application can have many satellite
assemblies, depending on how many cultures the application supports.

Web application projects use satellite assemblies to store the
translated strings, graphics, and other culture-dependent aspects of
an application's user interface. To create the assemblies themselves,
we use the Resource Manager. At run time, the Web application loads
the translated strings into the Web form based on the current thread's
CurrentUICulture property.

To use satellite assemblies, follow these steps:

1. Set the id and runat attributes for all of the user-interface
elements of application that require translation. Server controls have
these attributes by default, but we will need to add them to HTML
elements such as heading, paragraph, and span so that we can load
translated strings into those elements.

2. Create a fallback resource file containing the default strings to
display in the user interface if the user's culture is not specified
or not recognized. Name the fallback resource file filename.resx—for
example, strings.resx.

3. Create resource files containing the translated strings to display
for each general language that Web application supports. Name the
translated resource files filename.languagecode.resx—for example,

4. Optionally, create resource files containing the translated strings
to display for each specific culture that Web application supports.
Name the resource file filename.languagecode-regioncode.resx—for
example, strings.ex-MX.resx.

5. Write code to load the resources for the Web form using the
ResourceManager class.

6. Write code to detect the user's culture and set the Thread class's
CurrentCulture and CurrentUICulture properties to match. ASP.NET uses
the CurrentCulture property to determine formatting for dates,
currency, and numbers; ASP.NET uses the CurrentUICulture property to
determine which satellite assembly is used when loading translated

7. Write code to get strings from the resource files and display them
in elements on the Web form.


• Efficiency developing a new international version of the application
only involves creating a new international resource file because each
version has the same code block. This streamlines the creation of
multiple language versions of application.

• Greater security whether we decide to localize application in-house
or to use an external company, we will not need to access source code
to develop international versions of application.

• Less testing this approach dramatically reduces the amount of
testing required to ensure the quality of application's international

• Better localization by placing all relevant string resources in one
file, ensure a more efficient localization process and reduce the
chance of leaving some strings un-localized.


Deven Goratela

Note: This Group is not a Job Searching Group, so please co-operate
and dont transfer any kind of job related material across this
Group.AnyOne doing so can be banned from the Group
Thanx , Group Co-Ordinators

Yahoo! Groups Sponsor

Yahoo! Groups Links

To visit your group on the web, go to:

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


No comments: