Calendar .NET (v.2.2.0.0)  
Welcome to Calendar .NET Samples site!
Calendar Localization
Getting Started
  Overview
  What`s new
Samples
  Getting Started!
  Data Binding
  Event Bar
  Handling Events
  Spanning Items
  Localization
  Other Samples
Contact us!
  Support Forum
  Email Us

Calendar Localization

Calendar.NET Control supports easy localization. All you have to do is to set appropriate locale for the page or whole application to localize Calendar. All month and week names will be displayed in that language. Will will start on appropriate week day, for example it will start on Monday for German Locale and on Sunday for US locale. Locale can also be auto selected based on user browser settings. For example if user preffered language is Spanish, calendar will be rendered in Spanish language.


Overview

[View C# Code]   [View VB.NET Code]

  C#   VB  
 

// Set the culture and UI culture to the browser's accept language
if(Request.UserLanguages!=null)
{
    Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Request.UserLanguages[0]);
    Thread.CurrentThread.CurrentUICulture = new CultureInfo(Request.UserLanguages[0]);
}

' Set the culture and UI culture to the browser's accept language
If Request.UserLanguages! = Nothing Then

    Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Request.UserLanguages(0))
    Thread.CurrentThread.CurrentUICulture = New CultureInfo(Request.UserLanguages(0))

End If


Example source codes are included in Control Download.
 

Copyright 2005 Mediachase. All rights reserved.