Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.NET Return Server Native Language

Reply
Thread Tools

ASP.NET Return Server Native Language

 
 
Dessip
Guest
Posts: n/a
 
      06-15-2006
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

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      06-15-2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> 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
>



 
Reply With Quote
 
 
 
 
Dessip
Guest
Posts: n/a
 
      06-16-2006
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) ups.com...
> > 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
> >


 
Reply With Quote
 
Dessip
Guest
Posts: n/a
 
      06-16-2006
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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed) ups.com...
> > > 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
> > >


 
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
allow visitors to simply translate your site to their native language ! martin.benuska@gmail.com HTML 4 12-27-2006 04:03 AM
How to return data through native methods parameters? HappyHippy Java 3 09-07-2006 01:46 PM
Native language versions Ian Perl Misc 18 06-25-2006 09:23 PM
A language-agnostic language Ed Java 24 03-27-2006 08:19 PM
what value does lack of return or empty "return;" return Greenhorn C Programming 15 03-06-2005 08:19 PM



Advertisments