ASP.NET Return Server Native Language

D

Dessip

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
 
J

Juan T. Llibre

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.
 
D

Dessip

Sorry about this, but i have hit another problem

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.

Thanks In Advance
Dessip
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top