471,604 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,604 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 29578
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jonathan | last post: by
3 posts views Thread by Emmanuel | last post: by
2 posts views Thread by Andy Pickering | last post: by
4 posts views Thread by Harold Crump | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by

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.