Search code examples
localizationc1-cms

Get current language in C#


In Composite C1 I need to fetch the currently selected language, that the user selected over the language switcher package in an ASP.NET user control.

Of course I could read it from the PathInfo, but I bet there is a function for this.

How can I access the value programmatically in C#?


Solution

  • Pure vanilla c#

    CultureInfo.CurrentCulture
    

    http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.currentculture.aspx