473,395 Members | 1,978 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,395 software developers and data experts.

How to read operating system's current culture (regional settings)

adi
Hi
I'm using .NET Framework 1.1
My application needs to read the system's language settings.
How to do this?

Thanks.

Nov 22 '06 #1
4 29824
Hi Adi,

Use System.Threading.Thread.CurrentThread.CurrentCultu re. This is the
culture your thread is running in.
System.Threading.Thread.CurrentThread.CurrentUICul ture contains the
culture used for your resources files.
On Wed, 22 Nov 2006 12:58:35 +0100, adi <ad***********@ikonsoft.rowrote:
Hi
I'm using .NET Framework 1.1
My application needs to read the system's language settings.
How to do this?

Thanks.


--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 22 '06 #2
adi
Thanks

To be more explicit, I need to read the settings that I can found in
Control Panel / Regional and Language Options / Regional Options
property tab.

Is there at least an API function to call?
Morten Wennevik a scris:
Hi Adi,

Use System.Threading.Thread.CurrentThread.CurrentCultu re. This is the
culture your thread is running in.
System.Threading.Thread.CurrentThread.CurrentUICul ture contains the
culture used for your resources files.
On Wed, 22 Nov 2006 12:58:35 +0100, adi <ad***********@ikonsoft.rowrote:
Hi
I'm using .NET Framework 1.1
My application needs to read the system's language settings.
How to do this?

Thanks.

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 22 '06 #3
All this is contained inside the CultureInfo.DateTimeFormat,
CultureInfo.NumberFormat etc.

You can also read system settings directly using the SystemInformation
class or tap into WMI using the classes in System.Management /
System.Diagnostics
On Wed, 22 Nov 2006 13:45:39 +0100, adi <ad***********@ikonsoft.rowrote:
Thanks

To be more explicit, I need to read the settings that I can found in
Control Panel / Regional and Language Options / Regional Options
property tab.

Is there at least an API function to call?
Morten Wennevik a scris:
>Hi Adi,

Use System.Threading.Thread.CurrentThread.CurrentCultu re. This is the
culture your thread is running in.
System.Threading.Thread.CurrentThread.CurrentUICu lture contains the
culture used for your resources files.
On Wed, 22 Nov 2006 12:58:35 +0100, adi <ad***********@ikonsoft.ro>
wrote:
Hi
I'm using .NET Framework 1.1
My application needs to read the system's language settings.
How to do this?

Thanks.

--
Happy Coding!
Morten Wennevik [C# MVP]


--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 22 '06 #4
Thanks guys,

I'll take the temp dir approach.

Cheers,

JB
Nov 22 '06 #5

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

Similar topics

4
by: Jonathan | last post by:
Dear All, I am trying to set a webserver to use French regional settings for testing ASP pages. According to http://support.microsoft.com/kb/q306044, for IIS5, this is a matter of changing...
3
by: Emmanuel | last post by:
I want to know the decimal separator and the group separator character that the user has set in Regional Settings in Control Panel. I tryied to use...
3
by: Karunakararao | last post by:
Hi All, How can i get the date based on Regional settings . how can i get the date format using C# .NET " The date displayed in the date/time field should be formatted according to the...
2
by: Karunakararao | last post by:
Hi All regional settings made at the operating system level. For example, Canada uses a dd/mm/yyyy format while the US uses mm/dd/yyyy. how can i get this type date format : iam using this...
0
by: Karunakararao | last post by:
Hi Vinay I am not able to get the web application. regional settings made at the operating system level. For example, Canada uses a dd/mm/yyyy format while the US uses mm/dd/yyyy. and yyyy/mm/dd...
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"...
2
by: Andy Pickering | last post by:
I made the mistake of leaving the regional settings as US (I'm based in the UK) when I installed my development server (2003 Std). I've set the regional settings back to English (UK) in all of the...
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
4
by: Harold Crump | last post by:
Greetings, This is not strictly a ASP.NET question, but I am hoping someone can help. I have an ASP.NET web app that used the DateTime.Parse and Compare methods a lot. As expected, the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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,...

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.