This is a migrated thread and some comments may be shown as answers.

Challenge with Thailand Culture Code (th-TH)

4 Answers 521 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
J Dimassimo
Top achievements
Rank 1
J Dimassimo asked on 09 Oct 2009, 03:45 PM
First, let me explain that I am not a developer, but I am an web application manager... so my knowledge of code is somewhat limited.  I have a development team that fully supports code within my application.

The application in question is a global calendar that is in currently implemented in over 150 countries.  The application is designed to read a user's country from their login credentials, and display the appropriate culture-code attributes.  If a country decides to launch the calendar in English, we force the "en-US" culture code to override the localized telerik calendars and date-pickers.

Our Thailand clients have recently decided to switch from English to Thai.  The challenge we have is that when we activate the hailand culture code ("th-TH") it displays a buddist calendar, so the current year displays as 2552, instead of 2009.  Our Thailand clients are insistant that this is inappropriate for business use, and are requiring that we display their calendars in Thai, with the year 2009.

Can you advise if there is way for my development team to override the controls for the th-TH culture code so that the calendar year will display 2009, but the calendar language will remain in Thai?  We do not want to upgrade the entire Telerik control pack as it impacts other attributes within the code base that we are not working with in our current release.

EDIT:  I have just uploaded a series of screenshots that illustrate the controls in-application.  You can see in the 3rd screenshot that there are some inconsistancies in the year display - it seems to flip between 2010 and 2553.

4 Answers, 1 is accepted

Sort by
0
J Dimassimo
Top achievements
Rank 1
answered on 09 Oct 2009, 04:02 PM
pls remove this attachment
0
J Dimassimo
Top achievements
Rank 1
answered on 09 Oct 2009, 04:06 PM
pls remove this attachment
0
J Dimassimo
Top achievements
Rank 1
answered on 09 Oct 2009, 04:10 PM
one more try...
0
Veli
Telerik team
answered on 15 Oct 2009, 09:06 AM
Hello J Dimassimo,

Try reverting back to Gregorian calendar after you set the Thai culture in InitializeCulture():

protected override void InitializeCulture()
{
    System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("th-TH");
    System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.Calendar = new System.Globalization.GregorianCalendar();
}


Regards,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Calendar
Asked by
J Dimassimo
Top achievements
Rank 1
Answers by
J Dimassimo
Top achievements
Rank 1
Veli
Telerik team
Share this question
or