Saturday, August 18, 2012

Setting Culture in ASP.NET

Difference between Culture and UICulture

Culture defines culture dependent objects like currency, date, currency and number formatting.  This can only defined using a specific culture (ex: en-GB not en)

UICulture defines which resources (local and global) will be loaded for this page.  Both neutral and specific cultures.

Setting Culture dynamically at runtime

Culture and UICulture need to be set in the InitializeCulture event

protected override void InitializeCulture()
if (Request.Form["DropDownList1"] != null)
//can be neutral i.e. en or en-GB
UICulture = Request.Form["DropDownList1"];
//requires a specific culture ex: de-DE
Culture = Request.Form["DropDownList1"];


  1. It seems like CurrentUICulture in ASP.NET Development is something you would set before you fill the whole system, but CurrentCulture you will use as a reference during the system everytime you deal with date or something in that category.

  2. CurrentUICulture is changed to tell the program which resource files to select when loading the form/page. So you would create the resource files in advance for different culture displays (translated text, right-to-left, etc.) and then within the code have it pick which one to use. ASP.NET Application Developers


  3. شركة غسيل خزانات بمكة شركة غسيل خزانات بمكة
    شركة غسيل خزانات بجدة شركة غسيل خزانات بجدة
    شركة غسيل خزانات بالدمام شركة غسيل خزانات بالدمام
    شركة غسيل خزانات بالمدينة المنورة شركة غسيل خزانات بالمدينة المنورة

  4. Eleven Space Dev is an agency specializing in website development with ASP.NET Application Developers. We provide best ASP.NET Application Development solutions.