Localization
One of the nice way to localize a web page is
protected override void InitializeCulture()
{
CultureInfo ci = new CultureInfo(“es-mx”, false);
Thread.CurrentThread.CurrentUICulture = ci;
Thread.CurrentThread.CurrentCulture = ci;
}
but it goes out of hand very quickly, unless we do it in master page, or HttpModule’s PreRequest
HandlerExecute event or an application’s global.asax Application_BeginRequest method. Also one nasty thing about it is, the method is called even before all the controls initialized,therefore all control values are unavailable. Using parameter info, such as Request.Form["CultureSelectorDropDown"] can be a solution.
Programitically, this.lblGreeting.Text = GetLocalResourceObject(“greeting”).ToString(); would work. or putting meta:resourcekey in aspx.
No comments yet.
Leave a comment
-
Recent
-
Links
-
Archives
- August 2009 (1)
- July 2009 (2)
- April 2009 (4)
- March 2009 (6)
- February 2009 (5)
- January 2009 (4)
- December 2008 (3)
- November 2008 (35)
- October 2008 (20)
-
Categories
-
RSS
Entries RSS
Comments RSS