G
Guest
Okay, I have a problem with the en-GB culture object
My computer is set to the UK and for UK date formats, etc
If I set my culture to en-GB in the web.config everything works fine with UK dates
If I set my culture programmatically
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs
' Fires at the beginning of each reques
Dim culture As CultureInf
Dim lang As Strin
lang = HttpContext.Current.Request.UserLanguages(0
culture = CultureInfo.CreateSpecificCulture(lang
Thread.CurrentThread.CurrentCulture = cultur
End Su
I find I cannot enter dates in the UK format - it expects the US format. On investigating I found the reason why, when browsing the culture object created in the code its shortdateformat property is set to M/dd/yyyy which is incorrect
If the culture is set to US or FR via the above code the shortdateformat property is set fine and as a result everything works
I'm not totally confused as you get the culture objects from the Framework, no? So I seem to be in an unfixable situation at the moment.
My computer is set to the UK and for UK date formats, etc
If I set my culture to en-GB in the web.config everything works fine with UK dates
If I set my culture programmatically
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs
' Fires at the beginning of each reques
Dim culture As CultureInf
Dim lang As Strin
lang = HttpContext.Current.Request.UserLanguages(0
culture = CultureInfo.CreateSpecificCulture(lang
Thread.CurrentThread.CurrentCulture = cultur
End Su
I find I cannot enter dates in the UK format - it expects the US format. On investigating I found the reason why, when browsing the culture object created in the code its shortdateformat property is set to M/dd/yyyy which is incorrect
If the culture is set to US or FR via the above code the shortdateformat property is set fine and as a result everything works
I'm not totally confused as you get the culture objects from the Framework, no? So I seem to be in an unfixable situation at the moment.