473,396 Members | 2,098 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,396 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 29825
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
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?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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...

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.