- System.Globalization namespace is required for creating culture-sensitive applications.
- As a rule, a culture will be grouped into one of three categories: an invariant culture, a neutral culture, or a specific culture.
- Thread.CurrentThread.CurrentCulture gives a CultureInfo object representing the culture of the system in which the thread is executing.
- We should use formatting options when setting/displaying strings in our applications so that any changes made to the CurrentCulture would propagate to it.
- CurrentUICulture represents the culture for displaying the application and may or may not be the same as CurrentCulture.
- Also, CurrentUICulture must be set at application startup (suitably in Main( ) or Form constructor) which is a behavious opposed to CurrentCulture property. (which may be set at any time.
- The DateTimeFormatInfo class provides a comprehensive set of methods and properties to handle and respond to the dates of different cultures.
- Thread.CurrentThread.CurrentCulture.DateTimeFormat property is used for this purpose. It is of type DateFormatInfo.
- NumberFormat property represents the same case for numbers and currencies.
- CompareInfo property of CultureInfo allows for culture sensitive comparisons (usually for strings)
- CultureRegionAndInfoBuilder class is new in .NET 2.0
- A reference to C:\Windows\.NET Framework\[VERSION]\sysglobl.dll is required to use this class.
- This class takes CultureAndRegionModifiers enumeration value in its second argument for constructor which specifies how much of an existing culture should be loaded in the new custom culture.
Monday, August 10, 2009
Chapter 16-Lesson 1-2
Labels:
CompareInfo,
Culture,
CultureInfo,
Custom Culture,
Globalization,
Thread,
UICulture
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment