views:

34

answers:

1

I have a MasterPage and some controls in it, I also have a dropdown with languages, I'd like to know if theres is way to localize all of the controls within the masterpage because it doesn't have the InitializeCulture method.

Thanks in advance.

+1  A: 

I set the Culture in the global.asx file to ensure that all requests have it from the lowest level.

protected void Application_AcquireRequestState(object sender, EventArgs e)
{
    CultureInfo culture = new CultureInfo("en-NZ");
    System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
    System.Threading.Thread.CurrentThread.CurrentCulture = culture;
}

All controls should pick this up through the application.

toxaq