Return LCID From HTTPContext
A friend today asked me if it was possible to pass in the HTTPContext as a parameter into a static helper method to return the LCID of the current web request. It's actually really easy.
C#:
-
public static int harvestCurrentLCID(HttpContext context)
-
{
-
return (int) SPControl.GetContextWeb(context).Language;
-
}
That's pretty much it, it should return an integer that corresponds to the language type that correlates to the LCID of your SharePoint instance.
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URL























Articles & Research
SharePoint Architecture
Personal/Off-Topic
Article Or Research Filed Under 
