Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How can I get the selected language in the screenshot, from inside of a webpart?

alt text

I'm using sharepoint 2010. My webpart is a "visual web part" created in VS2010.

I'm trying things like "SPContext.Current.Web.CurrentUser.RegionalSettings" and "SPContext.Current.Web.Language" but ofcourse these things have nothing to do with that setting. :-|

Can someone please help me? What magical property am I looking for..

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Use the System.Threading.Thread.CurrentThread.CurrentUICulture.LCID to get the current LCID

share|improve this answer
    
oh god.. thanks –  thomas.stock May 26 '10 at 15:11
    
also System.Globalization.CultureInfo.CurrentUICulture.LCID is the same. –  Oleg Savelyev Apr 30 '13 at 13:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.