Advertisements

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"Dessip" <> wrote in message
news:...
> Hey,
>
> I was wondering if there is a command to return the language that the
> server is set up in, usering ASP.NET v1.1
>
> Because if you put Label1.Text = DateTime.Now.ToLongDateString and the
> server is in german it will return: Donnerstag, 15. Juni 2006
> But if its in english then it will return: Tuesday, 15. June 2006
>
> But i was wondering if there was a command to return what langage the
> server is in. e.g. Engllish, French, German.
>
>
> Dessip
>

Advertisements

Juan T. Llibre wrote:
> You don't need the language. What you need is the Current Culture.
>
> CultureInfo.CurrentCulture.Name
>
> You need to import the .Net Framework's System.Globalization class.
>
>
>
> Juan T. Llibre, asp.net MVP
> aspnetfaq.com : http://www.aspnetfaq.com/
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en español : http://asp.net.do/foros/
> ===================================
> "Dessip" <> wrote in message
> news:...
> > Hey,
> >
> > I was wondering if there is a command to return the language that the
> > server is set up in, usering ASP.NET v1.1
> >
> > Because if you put Label1.Text = DateTime.Now.ToLongDateString and the
> > server is in german it will return: Donnerstag, 15. Juni 2006
> > But if its in english then it will return: Tuesday, 15. June 2006
> >
> > But i was wondering if there was a command to return what langage the
> > server is in. e.g. Engllish, French, German.
> >
> >
> > Dessip
> >

But i was wondering where does it gather the information from. Because
i thought that it was from Control Panel>Regional Options but they are
set to English(United Kingdom) and for the development im hosting the
IIS locally, but for CultureInfo.CurrentCulture.EnglishName Its
returning German(Switzerland) so i guess that its not gathering the
data from there. So do you know where it is gathering it from.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!