ASP.NET Return Server Native Language

Discussion in 'ASP .Net' started by Dessip, Jun 15, 2006.

  1. Dessip

    Dessip Guest

    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
    Dessip, Jun 15, 2006
    #1
    1. Advertising

  2. 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
    >
    Juan T. Llibre, Jun 15, 2006
    #2
    1. Advertising

  3. Dessip

    Dessip Guest

    Ahh ok, so i was looking for the wrong thing :(
    Thank you for your help :)

    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
    > >
    Dessip, Jun 16, 2006
    #3
  4. Dessip

    Dessip Guest

    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


    Dessip wrote:
    > Ahh ok, so i was looking for the wrong thing :(
    > Thank you for your help :)
    >
    > 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
    > > >
    Dessip, Jun 16, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. HappyHippy
    Replies:
    3
    Views:
    314
    Gordon Beaton
    Sep 7, 2006
  2. Replies:
    4
    Views:
    389
    Harlan Messinger
    Dec 27, 2006
  3. Greenhorn
    Replies:
    15
    Views:
    784
    Keith Thompson
    Mar 6, 2005
  4. Ian

    Native language versions

    Ian, Jun 22, 2006, in forum: Perl Misc
    Replies:
    18
    Views:
    190
    Michele Dondi
    Jun 25, 2006
  5. Saxo
    Replies:
    32
    Views:
    340
    Arved Sandstrom
    Jan 28, 2014
Loading...

Share This Page