473,469 Members | 1,519 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CurrentCulture question

Hi, all!

I have a question about CurrentCulture
( System.Globalization.CultureInfo.CurrentCulture ). As I understand,
by default, System.Globalization.CultureInfo.CurrentCulture has the
same settings (currency, date, spearators,..) as these that we can see
and edit from Control Panel -Regional and Language Options.

It is true, when I use CurrentCulture in Console application in .Net
1.1.
But when I use it in ASP.Net Web Application 1.1 CurrentCulture
settings differs from "Regional and Language Options".

I looked web.config and machine.config - globalization section has
default attributes:
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>

In ASP.Net 2.0 everything is correct.

Can anyone help me?

Thanks,
Ilya

Sep 17 '07 #1
2 3925
Thanx for your reply.

I know how to set some predefined culture with
<globalization culture="xx-XX" uiCulture="xx-XX" />
...in web.config.
I need to get settings that user can see and change from Control Panel
-Regional and Language Options.
For example user can select "Russian" in Regional options and through
Customize button user can change the currency symbol from rouble
(default for Russian culture) to dollar, for exapmle.

I need to get these customized settings.

In Console application .NET 1.1 or ASP.NET 2.0 Web application
System.Globalization.CultureInfo.CurrentCulture works fine for this.

Thanks,
Ilya

Sep 17 '07 #2
I understand your sample, but I need slightly different functionality:

As I understand, in your sample when I choose Danish-Denmark, you load
"da-DK" culture (i.e. format string with this culture) with all
default values for this ("da-DK") culture ( currencySymbol = "kr", for
example).

I'll try to explain what I want to get:
In Control Panel -Regional and Language Options user selects Danish
culture. Than he or she clicks Customize and selects dollar ($) as
currencySymbol.
So, he gets a modified "da-DK" culture.

My goal is to get this *modified* "da-DK" culture when I start my
application: currencySign = '$', all other params the same with "da-
DK" culture.

In Console application .NET 1.1 or ASP.NET 2.0 Web application
System.Globalization.CultureInfo.CurrentCulture works fine for this.

Thanks,
Ilya

Sep 17 '07 #3

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

Similar topics

1
by: Rahul Agarwal | last post by:
Hi I am trying to write data back to the client using dataset.WriteXML and I have set the Thread.CurrentThread.CurrentCulture to "no" (norwegian) just before writing the data using WriteXML....
0
by: Muralidhar Chennoju | last post by:
Hi All How to get the Current DateFormat based on the regional settings. The following statment is giving right data when it is windows based application, but when I try the same in Web...
12
by: magister | last post by:
Hello, I know I can set the Culture to what I want, but shouldn't the current culture be taken from the regional settings on the web server's control panel!!! Mine is set to "united kingdom"...
1
by: DZoid | last post by:
Hi, I have an asp.net page that uses a component in my business tier, which in turn uses a component in my data tier. The business and data tiers are in separate assemblies. I set...
5
by: ra294 | last post by:
When I use the Now() Fucntion i my ASP.net application I get a date format of mm/dd/yy. I want it to be dd/mm/yy. I set in the web config "culture="en-GB" uiCulture="en" and also set the regional...
0
by: 00_CumPeeWearD12 | last post by:
I have been using Debug mode in Visual studio, running my app on localhost. Whenever I retrieve CultureInfo.CurrentCulture, I can get "en-US". However, when I compiled the whole application as...
2
by: arne.wiklund | last post by:
Is there an error in the currentCulture.NumberFormat.NumberDecimalSeparator? Take a look at this code: Thread.CurrentThread.CurrentCulture = new CultureInfo("nb-NO");...
5
by: Tsair | last post by:
I set the thread culture in MAIN() as below in order to show the date in format DAY/MONTH/YEAR, but the datagridview alway show the date in M/d/yyyy. How to set the default Date format from...
4
by: Rainer Queck | last post by:
Hi NG, in my application a <myDataTable>.Select fails with "Syntax error in the expression." It took me a while, isolate the cause to this: To select some datarows from a data table I am...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.