Localizing the Website Administration Tool


As the name implies, the Website Administration Tool is a convenient tool for administering ASP.NET Web sites. It is, in itself, an ASP.NET 2 application and adheres to the same patterns for localizing Web site applications that are offered in ASP.NET 2.

The files and folders that make up the Website Administration Tool are located in %FrameworkDir%\%FrameworkVersion%\ASP.NETWebAdminFiles, complete with standard App_GlobalResources and App_LocalResources folders containing resx files. The resx files contain the English (United States) resources for the Web-site Administration Tool. The installation of a .NET Framework 2 Language Pack adds new corresponding culture-neutral resx files to the various App_Global Resources and App_LocalResources folders (there is an App_LocalResources folder in each application folder). So if you install the French .NET Framework 2 Language Pack, then the App_GlobalResources\GlobalResources.resx file will have a French sibling, GlobalResources.fr.resx. The Website Administration Tool does not change the default values for CurrentCulture and CurrentUICulture. This means that, by default, the user interface that you see is dictated by the language of the operating system (and the presence of a corresponding .NET Framework 2 Language Pack). You are at liberty, however, to change the Website Administration Tool's web.config. To change the CurrentCulture and CurrentUICulture to French (France) and French, respectively, you would add the following element:

 <globalization culture="fr-FR" uiCulture="fr"/> 


The Website Administration Tool shows off the benefits of ASP.NET's internationalization model excellently. Imagine that you want a localized version of the Website Administration Tool, but there is no .NET Framework Language Pack for the language that you want to use. (The .NET Framework does, after all, support considerably more languages than there are .NET Framework Language Packs.) Simply add the corresponding resx files to support your language, set the culture and uiCulture in the web.config, and refresh your browser. The Website Administration Tool will use your new language.




.NET Internationalization(c) The Developer's Guide to Building Global Windows and Web Applications
.NET Internationalization: The Developers Guide to Building Global Windows and Web Applications
ISBN: 0321341384
EAN: 2147483647
Year: 2006
Pages: 213

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net