Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > calendar control language?

Reply
Thread Tools

calendar control language?

 
 
rom
Guest
Posts: n/a
 
      12-01-2004
in visual studio.net when i watch/design the calendar
control on the design view i see the days/months in my
language(hebrew) but on the web is generates it into
english. any way to solve this problem?
 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      12-01-2004
Hi,

At runtime, the calendar control picks up the culture info from the server.
You can override the default behaviour by setting the culture of the thread
the calendar is on:

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
Dim ci As System.Globalization.CultureInfo
Dim dtNow As Date = DateTime.Now
Dim strName As String = "he-IL"
System.Threading.Thread.CurrentThread.CurrentUICul ture = _
New System.Globalization.CultureInfo(strName, False)
System.Threading.Thread.CurrentThread.CurrentCultu re = _
New System.Globalization.CultureInfo(strName)
Calendar1.SelectedDate = dtNow
Calendar1.VisibleDate = dtNow
End Sub

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]
Toronto


"rom" <> wrote in message
news:06ca01c4d7ec$13bd4000$...
> in visual studio.net when i watch/design the calendar
> control on the design view i see the days/months in my
> language(hebrew) but on the web is generates it into
> english. any way to solve this problem?


 
Reply With Quote
 
 
 
 
rom
Guest
Posts: n/a
 
      12-02-2004
adding colture in the page line solves the problem:
<%@ Page colture="he-IL" Language="vb"..........
>-----Original Message-----
>Hi,
>
>At runtime, the calendar control picks up the culture

info from the server.
>You can override the default behaviour by setting the

culture of the thread
>the calendar is on:
>
> Private Sub Page_Load _
> (ByVal sender As System.Object, _
> ByVal e As System.EventArgs) _
> Handles MyBase.Load
> Dim ci As System.Globalization.CultureInfo
> Dim dtNow As Date = DateTime.Now
> Dim strName As String = "he-IL"
>

System.Threading.Thread.CurrentThread.CurrentUICul ture = _
> New System.Globalization.CultureInfo(strName,

False)
>

System.Threading.Thread.CurrentThread.CurrentCultu re = _
> New System.Globalization.CultureInfo(strName)
> Calendar1.SelectedDate = dtNow
> Calendar1.VisibleDate = dtNow
> End Sub
>
>Let us know if this helps?
>
>Ken
>Microsoft MVP [ASP.NET]
>Toronto
>
>
>"rom" <> wrote in message
>news:06ca01c4d7ec$13bd4000$...
>> in visual studio.net when i watch/design the calendar
>> control on the design view i see the days/months in my
>> language(hebrew) but on the web is generates it into
>> english. any way to solve this problem?

>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar GadGets does not show calendar iccsi Windows 64bit 4 08-14-2011 01:52 PM
How to Synchronise Hotmail Calendar with Standard Outlook Calendar using Outlook Connector ?? Synapse Syndrome Computer Support 0 12-02-2007 04:19 AM
Thunderbird Calendar with Exchange 2003 Calendar and Public FoldersCalendar jincmcse Firefox 1 09-03-2005 02:46 AM
Calendar Control - Programatically set the calendar to a date range Shevek ASP .Net 3 06-23-2004 01:41 PM
Calendar Control - Programatically set the calendar to a date range Shevek ASP .Net Web Controls 0 06-23-2004 12:06 PM



Advertisments