About BhashaIndia | Contribute | SiteMap | Register | Sign in to Windows Live ID
  Developers Patrons
Hindi Tamil Kannada Gujarati Marathi Telugu Bengali Malayalam Punjabi Konkani Oriya Sanskrit Nepali
Home > Developers > MSTech > Localizability > Resource Process Welcome Guest!

Resource Fallback Process & Resource Generation Process

Resource Fallback Process

The hub and spoke model for packaging and deploying resources uses a fallback process to locate appropriate resources. If an application user requests a ResourceSet that is unavailable, the common language runtime searches the hierarchy of cultures looking for an appropriate fallback resource that most closely matches the user's request, and raises an exception only as a last resort. At each level of the hierarchy, if an appropriate resource is found, the runtime uses it. If the resource is not found, the search continues at the next level.

Resource generation process

.resx file

  • XML-based file
  • describes resources

.resources file

  • binary compiled file

assembly

  • executable with default resources
  • resource-only satellite assembly (.resources.dll)

To make the resources usable from the .NET Framework the source formats (.txt or .resx) have to be compiled into the binary resource format (.resources). Pictured in the slide is the compilation for the ResX format. The tool for this compilation, the .NET Resource Generator resgen.exe, is included in the .NET Framework SDK. This tool can also be used to convert a binary resource file back to the ResX or text format.

Once the resources have been converted to the binary format they are already usable from the resource manager classes in the .NET Framework as so called "loose" resources. Usually the .resources file is embedded into an assembly though, because this has many additional benefits like version management, xcopy deployment, digital signing etc. The tools for this are either the .NET compilers or the assembly linker al.exe. The resources can either be embedded as default resources in the main assembly or into resource-only satellite assemblies.

Partner Profile | Privacy Statement | Why Passport | Testimonials
This site uses Unicode for non-English characters and uses Open Type fonts.
©2003-2007 Microsoft Corporation. All rights reserved.