views:

2629

answers:

3

Is there a way to detect the Language of the OS from within a c# class?

+7  A: 

With the System.Globalization.CultureInfo class you can determine what you want.

With CultureInfo.CurrentCulture you get the system set culture, with CultureInfo.CurrentUICulture you get the user set culture.

BeowulfOF
+1  A: 

Do you mean whether the machine is configured (e.g.) with English, French or Japanese?

Have a look at the CultureInfo class - particularly CurrentCulture, which is initialised from the OS current regional settings.

Bevan
A: 

System.Threading.Thread.CurrentThread.CurrentCulture

radekg