473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Obtaining Culture Info ???

Hi,

I try to obtain the current culture of a server by executing :

string str = Thread.CurrentThread.CurrentCulture.ToString();

Executing this in a console-applicastion results in the correct string (e.g. "en-AU")
but when executing in ASP.NET does the command always return "en-US" ???

How come ?
How can I make sure it does return the correct cultureInfo ?

thanks
Chris

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
Nov 16 '05 #1
2 1297
Chris,

This command gives the culture on the running computer what is your server.

The language and other information of your client you can you find using the
so named server variables.

http://msdn.microsoft.com/library/de...ablestopic.asp

I was as well not able yet to get the used culture back, however hope as
well that somebody shows how to do that.

Cor
Nov 16 '05 #2
<Chris C (cm****@yahoo.com)> wrote:
I try to obtain the current culture of a server by executing :

string str = Thread.CurrentThread.CurrentCulture.ToString();

Executing this in a console-applicastion results in the correct string (e.g. "en-AU")
but when executing in ASP.NET does the command always return "en-US" ???

How come ?
How can I make sure it does return the correct cultureInfo ?


I suspect the account under which ASP.NET is running really is running
as en-US. Changing the default locale for the whole system may change
this (as opposed to the one for an individual user). Not sure though...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Martin | last post by:
Dear Group Sorry for posting this here. I'm desperate for a solution to this problem and thought some of you might have come across it with .NET and SQL Server. Let's assume I've the following...
1
by: Dejan Vesic | last post by:
I found nasty "documentation" bug; ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemglobalizationcultureinfoclasstopic.htm claims that proper culture info name for Serbian (Cyrillic) - Serbia...
0
by: Mircea Pleteriu | last post by:
How to set the culture info of the Crystal Report document according to the aspx page's culture info ? I need it for numbers on the report
2
by: JezB | last post by:
How do I programatically set the culture at session level ?
3
by: Ashish | last post by:
I have a application in which culture settings are customizable, they dont depend on the machine settings on which the application is running, I need to make sure that all the threads running in...
2
by: cmrchs | last post by:
Hi, I try to obtain the current culture of a server by executing : Dim str as String str = Thread.CurrentThread.CurrentCulture.ToString() Executing this in a console-applicastion results in...
9
by: Edge | last post by:
hi, I am saving the user selected culture in a session variable so I can apply it back to all pages when refreshed and then load the proper .resx values. For that I am using global.asax
1
by: David Thielen | last post by:
Hi; How do I get the client user culture? I need to get the names for the weeks/months, num days/week, months/year, days/month, etc to display date selections to the user correctly. --...
11
by: John Nagle | last post by:
The Python SSL object offers two methods from obtaining the info from an SSL certificate, "server()" and "issuer()". The actual values in the certificate are a series of name/value pairs in ASN.1...
2
by: tamirmalas | last post by:
Hi, iam trying to set a culture info different than the current culture info on the system, the code compiles fine, but nothing happens, and the system culture is the one used for the program. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.