Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Globalization not working as intended when using da-DK

Reply
Thread Tools

Globalization not working as intended when using da-DK

 
 
Basildk
Guest
Posts: n/a
 
      08-30-2007
Hi.

I have a strange problem. We have an asp.net application running on
several server with different setups.
On 2 of our servers we experience that the globalization settings are
misbehaving.

We have boiled the problem down to this: (exemplified by a very simple
page)

protected void Page_Load(object sender, EventArgs e)
{
Response.Write(Thread.CurrentThread.CurrentCulture .Name + "<br />");
Response.Write(2.ToString("c", Thread.CurrentThread.CurrentCulture) +
"<br />");
Response.Write(DateTime.Now.ToString() + "<br />");
}

Output is the following:
da-DK
$2.00
8/30/2007 5:14:02 PM

Since currentCulture is "da-DK" i would have expected the something
like the following:
kr 2.00
30-08-2007
This is in fact the result coming from the servers that are working.

How come the Culture is not formatting the values correctly?

Thanks for the help..

 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      08-30-2007
What if you display CurrentUICulture ?

---
Patrice

"Basildk" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed) m...
> Hi.
>
> I have a strange problem. We have an asp.net application running on
> several server with different setups.
> On 2 of our servers we experience that the globalization settings are
> misbehaving.
>
> We have boiled the problem down to this: (exemplified by a very simple
> page)
>
> protected void Page_Load(object sender, EventArgs e)
> {
> Response.Write(Thread.CurrentThread.CurrentCulture .Name + "<br />");
> Response.Write(2.ToString("c", Thread.CurrentThread.CurrentCulture) +
> "<br />");
> Response.Write(DateTime.Now.ToString() + "<br />");
> }
>
> Output is the following:
> da-DK
> $2.00
> 8/30/2007 5:14:02 PM
>
> Since currentCulture is "da-DK" i would have expected the something
> like the following:
> kr 2.00
> 30-08-2007
> This is in fact the result coming from the servers that are working.
>
> How come the Culture is not formatting the values correctly?
>
> Thanks for the help..
>



 
Reply With Quote
 
 
 
 
Basildk
Guest
Posts: n/a
 
      08-30-2007
On 30 Aug., 17:30, "Patrice" <http://www.chez.com/scribe/> wrote:
> What if you display CurrentUICulture ?
>
> ---
> Patrice
>
> "Basildk" <(E-Mail Removed)> a écrit dans le message de news:
> (E-Mail Removed) m...
>
> > Hi.

>
> > I have a strange problem. We have an asp.net application running on
> > several server with different setups.
> > On 2 of our servers we experience that the globalization settings are
> > misbehaving.

>
> > We have boiled the problem down to this: (exemplified by a very simple
> > page)

>
> > protected void Page_Load(object sender, EventArgs e)
> > {
> > Response.Write(Thread.CurrentThread.CurrentCulture .Name + "<br />");
> > Response.Write(2.ToString("c", Thread.CurrentThread.CurrentCulture) +
> > "<br />");
> > Response.Write(DateTime.Now.ToString() + "<br />");
> > }

>
> > Output is the following:
> > da-DK
> > $2.00
> > 8/30/2007 5:14:02 PM

>
> > Since currentCulture is "da-DK" i would have expected the something
> > like the following:
> > kr 2.00
> > 30-08-2007
> > This is in fact the result coming from the servers that are working.

>
> > How come the Culture is not formatting the values correctly?

>
> > Thanks for the help..


That displays en-US, but as far as i know, that does not affect
formatting?

 
Reply With Quote
 
Basildk
Guest
Posts: n/a
 
      08-30-2007
On 30 Aug., 17:48, Basildk <(E-Mail Removed)> wrote:
> On 30 Aug., 17:30, "Patrice" <http://www.chez.com/scribe/> wrote:
>
>
>
> > What if you display CurrentUICulture ?

>
> > ---
> > Patrice

>
> > "Basildk" <(E-Mail Removed)> a écrit dans le message de news:
> > (E-Mail Removed) m...

>
> > > Hi.

>
> > > I have a strange problem. We have an asp.net application running on
> > > several server with different setups.
> > > On 2 of our servers we experience that the globalization settings are
> > > misbehaving.

>
> > > We have boiled the problem down to this: (exemplified by a very simple
> > > page)

>
> > > protected void Page_Load(object sender, EventArgs e)
> > > {
> > > Response.Write(Thread.CurrentThread.CurrentCulture .Name + "<br />");
> > > Response.Write(2.ToString("c", Thread.CurrentThread.CurrentCulture) +
> > > "<br />");
> > > Response.Write(DateTime.Now.ToString() + "<br />");
> > > }

>
> > > Output is the following:
> > > da-DK
> > > $2.00
> > > 8/30/2007 5:14:02 PM

>
> > > Since currentCulture is "da-DK" i would have expected the something
> > > like the following:
> > > kr 2.00
> > > 30-08-2007
> > > This is in fact the result coming from the servers that are working.

>
> > > How come the Culture is not formatting the values correctly?

>
> > > Thanks for the help..

>
> That displays en-US, but as far as i know, that does not affect
> formatting?


I just tried setting CurrentUICulture to "da-DK", but with the same
result..

 
Reply With Quote
 
Basildk
Guest
Posts: n/a
 
      08-30-2007
On 30 Aug., 17:51, Basildk <(E-Mail Removed)> wrote:
> On 30 Aug., 17:48, Basildk <(E-Mail Removed)> wrote:
>
>
>
> > On 30 Aug., 17:30, "Patrice" <http://www.chez.com/scribe/> wrote:

>
> > > What if you display CurrentUICulture ?

>
> > > ---
> > > Patrice

>
> > > "Basildk" <(E-Mail Removed)> a écrit dans le message de news:
> > > (E-Mail Removed) m...

>
> > > > Hi.

>
> > > > I have a strange problem. We have an asp.net application running on
> > > > several server with different setups.
> > > > On 2 of our servers we experience that the globalization settings are
> > > > misbehaving.

>
> > > > We have boiled the problem down to this: (exemplified by a very simple
> > > > page)

>
> > > > protected void Page_Load(object sender, EventArgs e)
> > > > {
> > > > Response.Write(Thread.CurrentThread.CurrentCulture .Name + "<br />");
> > > > Response.Write(2.ToString("c", Thread.CurrentThread.CurrentCulture) +
> > > > "<br />");
> > > > Response.Write(DateTime.Now.ToString() + "<br />");
> > > > }

>
> > > > Output is the following:
> > > > da-DK
> > > > $2.00
> > > > 8/30/2007 5:14:02 PM

>
> > > > Since currentCulture is "da-DK" i would have expected the something
> > > > like the following:
> > > > kr 2.00
> > > > 30-08-2007
> > > > This is in fact the result coming from the servers that are working.

>
> > > > How come the Culture is not formatting the values correctly?

>
> > > > Thanks for the help..

>
> > That displays en-US, but as far as i know, that does not affect
> > formatting?

>
> I just tried setting CurrentUICulture to "da-DK", but with the same
> result..


I researched a little further:
If i insert the following code:
Response.Write("Language " + cultureInfo.Name + "<br />");
Response.Write("---------------------------------<br />");
Response.Write("CurrencySymbol " +
cultureInfo.NumberFormat.CurrencySymbol.ToString() + "<br />");
Response.Write("DateSeparator " +
cultureInfo.DateTimeFormat.DateSeparator + "<br />");
Response.Write("LongDatePattern " +
cultureInfo.DateTimeFormat.LongDatePattern.ToStrin g() + "<br />");
Response.Write("ShortDatePattern " +
cultureInfo.DateTimeFormat.ShortDatePattern.ToStri ng() + "<br />");
string[] days = cultureInfo.DateTimeFormat.DayNames;
for( int i = 0; i < days.Length; i++)
{
Response.Write(days[i] + "<br />");
}
Response.Write("---------------------------------<br />");


I get the following output:

Language da-DK
---------------------------------
CurrencySymbol $
DateSeparator /
LongDatePattern dddd, MMMM dd, yyyy
ShortDatePattern M/d/yyyy
søndag
mandag
tirsdag
onsdag
torsdag
fredag
lørdag

In other words: Some of the values are perfect danish (the days) while
others are stille american (datepattern, dateseperator and
currencySymbol)
I am puzzled

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      08-30-2007
See if this sample code helps...

cultureChange.aspx:
-----------------------------
<%@ Page Language="VB" uiculture="auto" %>
<%@ Import Namespace="System.Threading" %>
<%@ Import Namespace="System.Globalization" %>

<script runat="server">
Protected Overrides Sub InitializeCulture()
If Request.Form("ListBox1") IsNot Nothing Then
Dim selectedLanguage As String = Request.Form("ListBox1")
UICulture = Request.Form("ListBox1")
Culture = Request.Form("ListBox1")
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedLanguage )
Thread.CurrentThread.CurrentUICulture = New CultureInfo(selectedLanguage)
End If
MyBase.InitializeCulture()
End Sub
Sub Page_Load(obj as object, e as eventargs)
Dim value as Double = 2.0
Dim s as String 'create a string and format it as currency.
s = String.Format("{0:c}", value)
lblMessage.Text = Listbox1.SelectedItem.Text
lblMessage2.Text = Listbox1.SelectedItem.Value & " " & DateTime.Now & " " & s

End Sub
</script>
<html>
<body>
<form id="form1" runat="server">
<div>
<asp:ListBox ID="ListBox1" runat="server">
<asp:ListItem Value="en-US" Selected="True">English</asp:ListItem>
<asp:ListItem Value="es-MX">Español</asp:ListItem>
<asp:ListItem Value="da-DK">Danish</asp:ListItem>
</asp:ListBox><br />
<asp:Button ID="Button1" runat="server"
Text="Set Language/Culture"
meta:resourcekey="Button1" />
<br />
<asp:Label ID="Label1" runat="server"
Text=""
meta:resourcekey="Label1" />
</div>
<div>
<asp:Label id="lblMessage" runat="server"/></asp:Label> <br />
<asp:Label id="lblMessage2" runat="server"/></asp:Label> <br />
</div>

</form>
</body>
</html>
----------

That code changes the culture/language on demand...

If you select Danish and click the Button, you'll see kr displayed, and the Danish time format,
but if you select English, you'll see $ displayed and the US time format.

You should be able to adapt it for your purposes.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Basildk" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) ups.com...
On 30 Aug., 17:48, Basildk <(E-Mail Removed)> wrote:
> On 30 Aug., 17:30, "Patrice" <http://www.chez.com/scribe/> wrote:
>
>
>
> > What if you display CurrentUICulture ?

>
> > ---
> > Patrice

>
> > "Basildk" <(E-Mail Removed)> a écrit dans le message de news:
> > (E-Mail Removed) m...

>
> > > Hi.

>
> > > I have a strange problem. We have an asp.net application running on
> > > several server with different setups.
> > > On 2 of our servers we experience that the globalization settings are
> > > misbehaving.

>
> > > We have boiled the problem down to this: (exemplified by a very simple
> > > page)

>
> > > protected void Page_Load(object sender, EventArgs e)
> > > {
> > > Response.Write(Thread.CurrentThread.CurrentCulture .Name + "<br />");
> > > Response.Write(2.ToString("c", Thread.CurrentThread.CurrentCulture) +
> > > "<br />");
> > > Response.Write(DateTime.Now.ToString() + "<br />");
> > > }

>
> > > Output is the following:
> > > da-DK
> > > $2.00
> > > 8/30/2007 5:14:02 PM

>
> > > Since currentCulture is "da-DK" i would have expected the something
> > > like the following:
> > > kr 2.00
> > > 30-08-2007
> > > This is in fact the result coming from the servers that are working.

>
> > > How come the Culture is not formatting the values correctly?

>
> > > Thanks for the help..

>
> That displays en-US, but as far as i know, that does not affect
> formatting?


I just tried setting CurrentUICulture to "da-DK", but with the same
result..


 
Reply With Quote
 
Basildk
Guest
Posts: n/a
 
      08-30-2007
On 30 Aug., 18:21, "Juan T. Llibre" <(E-Mail Removed)> wrote:
> See if this sample code helps...
>
> cultureChange.aspx:
> -----------------------------
> <%@ Page Language="VB" uiculture="auto" %>
> <%@ Import Namespace="System.Threading" %>
> <%@ Import Namespace="System.Globalization" %>
>
> <script runat="server">
> Protected Overrides Sub InitializeCulture()
> If Request.Form("ListBox1") IsNot Nothing Then
> Dim selectedLanguage As String = Request.Form("ListBox1")
> UICulture = Request.Form("ListBox1")
> Culture = Request.Form("ListBox1")
> Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedLanguage )
> Thread.CurrentThread.CurrentUICulture = New CultureInfo(selectedLanguage)
> End If
> MyBase.InitializeCulture()
> End Sub
> Sub Page_Load(obj as object, e as eventargs)
> Dim value as Double = 2.0
> Dim s as String 'create a string and format it as currency.
> s = String.Format("{0:c}", value)
> lblMessage.Text = Listbox1.SelectedItem.Text
> lblMessage2.Text = Listbox1.SelectedItem.Value & " " & DateTime.Now & " " & s
>
> End Sub
> </script>
> <html>
> <body>
> <form id="form1" runat="server">
> <div>
> <asp:ListBox ID="ListBox1" runat="server">
> <asp:ListItem Value="en-US" Selected="True">English</asp:ListItem>
> <asp:ListItem Value="es-MX">Español</asp:ListItem>
> <asp:ListItem Value="da-DK">Danish</asp:ListItem>
> </asp:ListBox><br />
> <asp:Button ID="Button1" runat="server"
> Text="Set Language/Culture"
> meta:resourcekey="Button1" />
> <br />
> <asp:Label ID="Label1" runat="server"
> Text=""
> meta:resourcekey="Label1" />
> </div>
> <div>
> <asp:Label id="lblMessage" runat="server"/></asp:Label> <br />
> <asp:Label id="lblMessage2" runat="server"/></asp:Label> <br />
> </div>
>
> </form>
> </body>
> </html>
> ----------
>
> That code changes the culture/language on demand...
>
> If you select Danish and click the Button, you'll see kr displayed, and the Danish time format,
> but if you select English, you'll see $ displayed and the US time format.
>
> You should be able to adapt it for your purposes.
>
> Juan T. Llibre, asp.net MVP
> asp.net faq :http://asp.net.do/faq/
> foros de asp.net, en español :http://asp.net.do/foros/
> ======================================"Basildk" <(E-Mail Removed)> wrote in messagenews:(E-Mail Removed) oglegroups.com...
>
> On 30 Aug., 17:48, Basildk <(E-Mail Removed)> wrote:
>
>
>
> > On 30 Aug., 17:30, "Patrice" <http://www.chez.com/scribe/> wrote:

>
> > > What if you display CurrentUICulture ?

>
> > > ---
> > > Patrice

>
> > > "Basildk" <(E-Mail Removed)> a écrit dans le message de news:
> > > (E-Mail Removed) m...

>
> > > > Hi.

>
> > > > I have a strange problem. We have an asp.net application running on
> > > > several server with different setups.
> > > > On 2 of our servers we experience that the globalization settings are
> > > > misbehaving.

>
> > > > We have boiled the problem down to this: (exemplified by a very simple
> > > > page)

>
> > > > protected void Page_Load(object sender, EventArgs e)
> > > > {
> > > > Response.Write(Thread.CurrentThread.CurrentCulture .Name + "<br />");
> > > > Response.Write(2.ToString("c", Thread.CurrentThread.CurrentCulture) +
> > > > "<br />");
> > > > Response.Write(DateTime.Now.ToString() + "<br />");
> > > > }

>
> > > > Output is the following:
> > > > da-DK
> > > > $2.00
> > > > 8/30/2007 5:14:02 PM

>
> > > > Since currentCulture is "da-DK" i would have expected the something
> > > > like the following:
> > > > kr 2.00
> > > > 30-08-2007
> > > > This is in fact the result coming from the servers that are working.

>
> > > > How come the Culture is not formatting the values correctly?

>
> > > > Thanks for the help..

>
> > That displays en-US, but as far as i know, that does not affect
> > formatting?

>
> I just tried setting CurrentUICulture to "da-DK", but with the same
> result..


Thanks for the reply. I tried you code, but with the feared result:

Danish
da-DK 8/30/2007 6:32:32 PM $2.00

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      08-30-2007
re:
!> Thanks for the reply. I tried you code, but with the feared result:

I don't have a clue why it would work at my server and not on yours.

See the online sample at :

http://asp.net.do/test/culture3.aspx

Are you formatting the string as currency, per the sample ?

!> Dim value as Double = 2.0
!> Dim s as String 'create a string and format it as currency.
!> s = String.Format("{0:c}", value)

If you don't format the string as currency, no currency symbol change can occur.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Basildk" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) ups.com...
On 30 Aug., 18:21, "Juan T. Llibre" <(E-Mail Removed)> wrote:
> See if this sample code helps...
>
> cultureChange.aspx:
> -----------------------------
> <%@ Page Language="VB" uiculture="auto" %>
> <%@ Import Namespace="System.Threading" %>
> <%@ Import Namespace="System.Globalization" %>
>
> <script runat="server">
> Protected Overrides Sub InitializeCulture()
> If Request.Form("ListBox1") IsNot Nothing Then
> Dim selectedLanguage As String = Request.Form("ListBox1")
> UICulture = Request.Form("ListBox1")
> Culture = Request.Form("ListBox1")
> Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedLanguage )
> Thread.CurrentThread.CurrentUICulture = New CultureInfo(selectedLanguage)
> End If
> MyBase.InitializeCulture()
> End Sub
> Sub Page_Load(obj as object, e as eventargs)
> Dim value as Double = 2.0
> Dim s as String 'create a string and format it as currency.
> s = String.Format("{0:c}", value)
> lblMessage.Text = Listbox1.SelectedItem.Text
> lblMessage2.Text = Listbox1.SelectedItem.Value & " " & DateTime.Now & " " & s
>
> End Sub
> </script>
> <html>
> <body>
> <form id="form1" runat="server">
> <div>
> <asp:ListBox ID="ListBox1" runat="server">
> <asp:ListItem Value="en-US" Selected="True">English</asp:ListItem>
> <asp:ListItem Value="es-MX">Español</asp:ListItem>
> <asp:ListItem Value="da-DK">Danish</asp:ListItem>
> </asp:ListBox><br />
> <asp:Button ID="Button1" runat="server"
> Text="Set Language/Culture"
> meta:resourcekey="Button1" />
> <br />
> <asp:Label ID="Label1" runat="server"
> Text=""
> meta:resourcekey="Label1" />
> </div>
> <div>
> <asp:Label id="lblMessage" runat="server"/></asp:Label> <br />
> <asp:Label id="lblMessage2" runat="server"/></asp:Label> <br />
> </div>
>
> </form>
> </body>
> </html>
> ----------
>
> That code changes the culture/language on demand...
>
> If you select Danish and click the Button, you'll see kr displayed, and the Danish time format,
> but if you select English, you'll see $ displayed and the US time format.
>
> You should be able to adapt it for your purposes.
>
> Juan T. Llibre, asp.net MVP
> asp.net faq :http://asp.net.do/faq/
> foros de asp.net, en español :http://asp.net.do/foros/
> ======================================"Basildk" <(E-Mail Removed)> wrote in
> messagenews:(E-Mail Removed) oglegroups.com...
>
> On 30 Aug., 17:48, Basildk <(E-Mail Removed)> wrote:
>
>
>
> > On 30 Aug., 17:30, "Patrice" <http://www.chez.com/scribe/> wrote:

>
> > > What if you display CurrentUICulture ?

>
> > > ---
> > > Patrice

>
> > > "Basildk" <(E-Mail Removed)> a écrit dans le message de news:
> > > (E-Mail Removed) m...

>
> > > > Hi.

>
> > > > I have a strange problem. We have an asp.net application running on
> > > > several server with different setups.
> > > > On 2 of our servers we experience that the globalization settings are
> > > > misbehaving.

>
> > > > We have boiled the problem down to this: (exemplified by a very simple
> > > > page)

>
> > > > protected void Page_Load(object sender, EventArgs e)
> > > > {
> > > > Response.Write(Thread.CurrentThread.CurrentCulture .Name + "<br />");
> > > > Response.Write(2.ToString("c", Thread.CurrentThread.CurrentCulture) +
> > > > "<br />");
> > > > Response.Write(DateTime.Now.ToString() + "<br />");
> > > > }

>
> > > > Output is the following:
> > > > da-DK
> > > > $2.00
> > > > 8/30/2007 5:14:02 PM

>
> > > > Since currentCulture is "da-DK" i would have expected the something
> > > > like the following:
> > > > kr 2.00
> > > > 30-08-2007
> > > > This is in fact the result coming from the servers that are working.

>
> > > > How come the Culture is not formatting the values correctly?

>
> > > > Thanks for the help..

>
> > That displays en-US, but as far as i know, that does not affect
> > formatting?

>
> I just tried setting CurrentUICulture to "da-DK", but with the same
> result..


Thanks for the reply. I tried you code, but with the feared result:

Danish
da-DK 8/30/2007 6:32:32 PM $2.00


 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      08-31-2007
Yeah just random thoughts & tries for now...

What if you try a *Windows* .NET based application on the server that you'll
run under a regular account. Do you have the same result ? In case it would
work what if you make your ASP.NET application run under the same account ?

I'm not sure how .NET get these info (my understanding at least for 2.0
would be that they are build right into the framework ??). If the FW uses
system files to get those info then it could be a system level problem with
nls support files and I belive I saw once this in classic ASP and it was a
profile related issue...

--
Good luck, sorry for the poor help


"Basildk" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed). com...
On 30 Aug., 17:51, Basildk <(E-Mail Removed)> wrote:
> On 30 Aug., 17:48, Basildk <(E-Mail Removed)> wrote:
>
>
>
> > On 30 Aug., 17:30, "Patrice" <http://www.chez.com/scribe/> wrote:

>
> > > What if you display CurrentUICulture ?

>
> > > ---
> > > Patrice

>
> > > "Basildk" <(E-Mail Removed)> a écrit dans le message de news:
> > > (E-Mail Removed) m...

>
> > > > Hi.

>
> > > > I have a strange problem. We have an asp.net application running on
> > > > several server with different setups.
> > > > On 2 of our servers we experience that the globalization settings
> > > > are
> > > > misbehaving.

>
> > > > We have boiled the problem down to this: (exemplified by a very
> > > > simple
> > > > page)

>
> > > > protected void Page_Load(object sender, EventArgs e)
> > > > {
> > > > Response.Write(Thread.CurrentThread.CurrentCulture .Name + "<br />");
> > > > Response.Write(2.ToString("c", Thread.CurrentThread.CurrentCulture)
> > > > +
> > > > "<br />");
> > > > Response.Write(DateTime.Now.ToString() + "<br />");
> > > > }

>
> > > > Output is the following:
> > > > da-DK
> > > > $2.00
> > > > 8/30/2007 5:14:02 PM

>
> > > > Since currentCulture is "da-DK" i would have expected the something
> > > > like the following:
> > > > kr 2.00
> > > > 30-08-2007
> > > > This is in fact the result coming from the servers that are working.

>
> > > > How come the Culture is not formatting the values correctly?

>
> > > > Thanks for the help..

>
> > That displays en-US, but as far as i know, that does not affect
> > formatting?

>
> I just tried setting CurrentUICulture to "da-DK", but with the same
> result..


I researched a little further:
If i insert the following code:
Response.Write("Language " + cultureInfo.Name + "<br />");
Response.Write("---------------------------------<br />");
Response.Write("CurrencySymbol " +
cultureInfo.NumberFormat.CurrencySymbol.ToString() + "<br />");
Response.Write("DateSeparator " +
cultureInfo.DateTimeFormat.DateSeparator + "<br />");
Response.Write("LongDatePattern " +
cultureInfo.DateTimeFormat.LongDatePattern.ToStrin g() + "<br />");
Response.Write("ShortDatePattern " +
cultureInfo.DateTimeFormat.ShortDatePattern.ToStri ng() + "<br />");
string[] days = cultureInfo.DateTimeFormat.DayNames;
for( int i = 0; i < days.Length; i++)
{
Response.Write(days[i] + "<br />");
}
Response.Write("---------------------------------<br />");


I get the following output:

Language da-DK
---------------------------------
CurrencySymbol $
DateSeparator /
LongDatePattern dddd, MMMM dd, yyyy
ShortDatePattern M/d/yyyy
søndag
mandag
tirsdag
onsdag
torsdag
fredag
lørdag

In other words: Some of the values are perfect danish (the days) while
others are stille american (datepattern, dateseperator and
currencySymbol)
I am puzzled


 
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
Decision (if, else) routine is not working as intended with CGImodule epsilon Python 2 01-29-2008 11:34 PM
LoginView - I'm probably trying to use it in a way that's not intended... Homer J. Simpson ASP .Net 0 08-29-2007 07:52 PM
is asynchat broken or just not intended to work like other dispatchers? [PATCH] Martin Maney Python 1 04-11-2007 07:34 PM
Parallel::ForkManager not working as intended on Windows Server 2003 chaitu Perl Misc 2 09-21-2006 06:03 AM
nested includes not working as intended Mike ASP General 4 08-05-2003 02:59 PM



Advertisments