469,275 Members | 1,852 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

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 29333
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 CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.