Special Edition Using ASP.Net
ASP.NET enables you to use the CultureInfo class at the page level to supply localized settings. Culture settings tell the application in what language it should display its content. In the case of a German traveler in the United States, this class would reflect the origin of the user ”Germany. The following example shows the initial culture setting to be the culture of the server: culture = CultureInfo.CurrentCulture To use a different culture, use the following syntax: culture = New CultureInfo(NewCulture.Value) The new culture now becomes the default setting. You can now show the page content in the new culture: <% Thread.CurrentThread.CurrentCulture = culture %> ... Current Culture is <%= CultureInfo.CurrentCulture.Name %> (<%=Thread.CurrentThread.CurrentCulture.Name%>), <%= CultureInfo.CurrentCulture.EnglishName %>/<%= CultureInfo.CurrentCulture.NativeName% ASP.NET allows the use of the RegionInfo class as well. It is much like the culture class. With RegionInfo , in the case of a German traveler in the United States, this class would reflect the location of the user ”the United States. The following example shows the initial region setting to be the default region of the server: region = RegionInfo.CurrentRegion To use a different region, use the following syntax: region = New RegionInfo(NewRegion.Value) |