calendar control language?

Discussion in 'ASP .Net Web Controls' started by rom, Dec 1, 2004.

  1. rom

    rom Guest

    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?
    rom, Dec 1, 2004
    #1
    1. Advertising

  2. 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.CurrentUICulture = _
    New System.Globalization.CultureInfo(strName, False)
    System.Threading.Thread.CurrentThread.CurrentCulture = _
    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?
    Ken Cox [Microsoft MVP], Dec 1, 2004
    #2
    1. Advertising

  3. rom

    rom Guest

    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.CurrentUICulture = _
    > New System.Globalization.CultureInfo(strName,

    False)
    >

    System.Threading.Thread.CurrentThread.CurrentCulture = _
    > 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?

    >
    >.
    >
    rom, Dec 2, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Francois
    Replies:
    0
    Views:
    346
    Francois
    Aug 8, 2003
  2. Shevek
    Replies:
    3
    Views:
    6,008
    Shevek
    Jun 23, 2004
  3. Marin
    Replies:
    1
    Views:
    662
    Juan T. Llibre
    Jan 10, 2008
  4. Shevek
    Replies:
    0
    Views:
    372
    Shevek
    Jun 23, 2004
  5. Marin

    Change language in Calendar control

    Marin, Jan 10, 2008, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    264
    Juan T. Llibre
    Jan 10, 2008
Loading...

Share This Page