I am having some problems in changing the language in SharePoint programmatically. I have two language packs installed on my server (Norwegian and English). If I change the language manually through the GUI then its changing but when I do it programmatically it is setting the Lcid of the language in the background as default language but not translating the content. I am checking lcid on the page load. It is the selected one. I have also updated the site after changing locale ID.
Here is the code. Please tell me where I am missing something or something else.
ImageButton btn = sender as ImageButton; SPWeb spweb = SPContext.Current.Web; spweb.AllowUnsafeUpdates = true; int LCID = Convert.ToInt32(btn.ID); CultureInfo culture = new CultureInfo(LCID); spweb.Locale = culture; spweb.Update(); string url = btn.ImageUrl; string btnId = btn.ID; imgBtnDefault.ImageUrl = url; imgBtnDefault.Height = 18; imgBtnDefault.Width = 25; spweb.AllowUnsafeUpdates = false;