Search code examples
c#globalizationcultureinfocurrentculture

Get current language in CultureInfo


How to identify the operating system's language using CultureInfo? E.g. if the language in Windows is set to French, I need to identify French and load the fr resource files data.


Solution

  • I think something like this would give you the current CultureInfo:

    CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;
    

    Is that what you're looking for?