Confused Culture

Results 1 to 2 of 2

Thread: Confused Culture

  1. #1
    Join Date
    Dec 1969

    Default Confused Culture

    When I had the following in my Global.asx:<BR> Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)<BR> Dim culture As CultureInfo<BR> culture = New CultureInfo("en-ZA")<BR> Thread.CurrentThread.CurrentCulture = culture<BR> Thread.CurrentThread.CurrentUICulture = culture<BR> End Sub<BR><BR>AND the following in my Web.Config:<BR> &#060;globalization <BR> requestEncoding="utf-8" <BR> responseEncoding="utf-8" <BR> fileEncoding="utf-8" <BR> culture="en-ZA" <BR> uiCulture="en-ZA" /&#062;<BR><BR>I could not capture dates as dd/MM/yyyy but as soon as I removed the settings from the Global.asax all worked great.<BR><BR>Why?

  2. #2

    Default Works from base page

    I&#039;m doing the same thing, but I use a base class for my webforms and the base class has the following in it&#039;s <BR>OnInit() function.<BR>I&#039;m not sure about the d-m-y vs m-d-y, but swithching from English to French gives the french month names.<BR><BR>Have you found any good examples of working with cultrre info? <BR>I use it to pass language to all my controls on a page, but I have to set it from a cookie each request.<BR><BR>CultureInfo currentCulture = CultureInfo.CurrentCulture;<BR>currentCulture = new CultureInfo(UserData.LanguageID);<BR>Thread.Curren tThread.CurrentCulture = currentCulture;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts