Calendar Control


Another ASP.NET control that you might consider in the internationalization of your Web application is the Calendar control. The good news is that the Calendar control is automatically localized without you having to take any action. The System.Web.UI.WebControls.Calendar control uses the .NET Framework's System.Globalization.Calendar classes (see Chapter 6, "Globalization") to load its display information. The .NET Framework includes all of the day and month names for all supported cultures, so no .NET Framework Language Packs need to be installed on the Web server to fully localize this control.

Potentially, there is also some bad news. Because the WebControls.Calendar class uses the Globalization.Calendar classes, the control is dependent upon the CurrentCulture to draw its localized resources. This is contrary to what you might have expected because the user interface normally uses the CurrentUICulture to draw its resources. In practice, this will not make any difference to your application if your application does not make a distinction between CurrentCulture and CurrentUICulture, and these values are always kept in synch. However, if you allow them to be set independently of each other and you use the Calendar control, your application will have a schizophrenic user interface, with the majority of the application using one culture and the Calendar controls using another.




.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